Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Modify Installer Tables at run-time


7 replies to this topic

Hiob

Hiob
  • Full Members
  • 4 posts

Posted 19 December 2008 - 07:58

Hello,

i am working with InstallShield 12 Premier and have the following problem:

I want to adjust the size of the dialogs bevore the first dialog is starting.
So i need to modify the Windows Installer Tables of my Installation at run-time.

To change dialog-Pictures seems to be no problem. But modifying the tables is still a problem. My Information-status now is, that modifying records in Installer Tables at run-time is not possible. You can add records but cant change or delete existing (rec's).

At the moment i am trying to get the View.Modify Method (requires Msi.dll)
working via custom action.
This hint comes from http://community.acr...p?t-161144.html .

Thank you very much in advance
Carsten


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 December 2008 - 11:24

Just curious why you need to resize the dialogs on the fly?

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 23 December 2008 - 16:04

You can update records during an install, if I remember correctly:

- Create a select query retrieving that record.
- Call MsiViewFetch to fetch the record being deleted.
- Call MsiViewUpdate, pass that record to delete it.
- Update that record with the new values, do not touch column 0.
- Call MsiViewUpdate, pass that record to insert it temporarily.


Hiob

Hiob
  • Full Members
  • 4 posts

Posted 05 January 2009 - 11:26

A happy new year and thanks for your help smile.gif

For understanding my problem:

I make installations for different products. Each product is localized in different languages. The number of Languages can vary.
The strings of the Install-dialogs are different in length depending on the language.

All the Installdialogs shall appear in the same size.
If the reserved "string-container" on the dialog-form is to small for the string, there is sometimes the need for customizing it. When there's not enough space on the dialog-form left you have to resize the dialog-form-size. Depending on the layout this customizing have to be applied on all of the other dialog-form-elements too.

So i thought it would be nice to do it via InstallScript.
First time it will be some work to collect the layout-data for the dialogs.
"But then i will change just two constant in the script to resize all dialogs of the Installation".
For the other Dialog-Form-Elements it is just the same.

new feedback is coming soon...

thank you for you interest



VBScab

VBScab
  • Full Members
  • 436 posts

Posted 05 January 2009 - 14:04

I think it'd be easier to use language transforms, wouldn't it?
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 05 January 2009 - 19:02

This sounds like something you want to do at desgin time/build time, not a run time. As VBScab mentioned, language transforms are typically used for this purpose.

Hiob

Hiob
  • Full Members
  • 4 posts

Posted 06 January 2009 - 10:52

You are right and wrong wink.gif

I'm just an Installer-Beginner so i really don't know what to do with language-transforms.

I searched for some info about it but i did not find anything helpful concerning my problem.

As explained i make installations for some products of my company beeing distributed in different languages.

The source of the problem is simple - the chairman and his wishes.

He want's the dialog-forms appear in corporate design (all the same size).

Now i had the first case, when increasing the space of the Information-Container on the Dialog-Form would not solve my problem. Because the area of the dialog-form doesn't contain any more space which could be used.
So I have to increase the size of the dialog to get the space. When i do this, the layout-relations of the rest of the elements are "broken". I have to adjust their positions. And because all the Dialogs shall appear in the same size i have to adjust the other dialogs and their elements too.
This is quit a lot of monotone and boring work. And the really bad thing is, it is more then possible that it will be happen in future again.

So i thought i collect the layout data from the Installer Tables and think about a concept to adjust the dialogforms via Installscript.
If the basic-size of the forms is changed (the graphic solution is the only constant -
640*480 = 1,3:1) their elements shall be adjusted automatically by the script.

So it is a Problem which must be solved at Buildtime but the solution gets not active before runtime. (Multi-language-Installation --> depending on the install-language the dialogforms will be prepared)

I hope i havent made a mosquito to an elephant. huh.gif

Thanks for ideas

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 06 January 2009 - 12:01

QUOTE (Hiob @ 2009-01-06 09:52)
I'm just an Installer-Beginner so i really don't know what to do with language-transforms.

What you're proposing is light years more complex than simply using transforms, if indeed it's even possible. The only way I can think of doing it would be by creating temporary Views of the parent database and altering records therein via script. Already, my eyes are glazing over at THAT prospect and I've been doing this stuff (and development work) for a long time! For a newcomer, it's really a non-starter, IMV.

You may want to consider building separate releases of the MSI according to language. However, I believe transforms is the way to go.

Transforms are, if you like, a delta on their parent MSI database, i.e. they contain changes/additions/removals from the parent MSI. They're really not complicated to create. Your authoring tool (which is...?) will be able to handle their creation.

Edited by VBScab, 06 January 2009 - 12:02.

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.