cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ElenaN
Level 6

Why some properties are not accesible from SetupCompleteSuccess dialog

I need to read public property in custom action which is called on clicking Finish on SetupCompleteSuccess dialog. The problem is - the property is not accessible on that stage– MsiGetProperty retrieve empty string. Same Custom Action works as expected if I place it in Execute sequence after InstallFinalize. So how can I make property accesible both in Execute sequence and from SetupCompleteSuccess dialog?
Labels (1)
0 Kudos
(7) Replies
Videstra
Level 7

Not sure if this will fit your need - but I have resorted to writing a custom action that saves properties when they are accessible into an external, temporary file. I can then read that file with a custom action at a time when they are no longer available inside IS.
0 Kudos
ElenaN
Level 6

Thanks for the answer, Destek.
I was about to do something similar to your suggestion when I found next topic: http://forum.installsite.net/index.php?showtopic=12891
where Stefan Krueger says “AFAIK you cannot pass properties from the execute sequence back to the UI sequence”. It discribes just my case (however I still would like to know why it is so - some theoretical explanation)

Anyway, I moved CA which sets property in question from Execute sequence to UI sequence after ExecuteAction. And the property became available from the SetupCompleteSuccess dialog. Hurray 🙂
0 Kudos
Christopher_Pai
Level 16

Good question. I'm not sure if I've ever read an explanation of why the MSI server process doesn't propogate property changes back to the client side. I'll do some googling and/or ask around.
0 Kudos
RobertDickau
Flexera Alumni

I suppose it's that the UI sequence doesn't "do" anything---doesn't make any system changes---so (the thinking presumably goes) why would properties need to trickle back from the Execute sequence process to the UI sequence process? Plus, it's simple to pass things from the UI sequence to the Execute sequence with command-line args, but not vice versa:

[code]MSI (c) (EE:EK) [25:00:00:052]: Switching to server: ALLUSERS="1"
ROOTDRIVE="C:\" SECONDSEQUENCE="1" EXECUTEACTION="INSTALL"
INSTALLDIR="C:\Program Files\Me\LoggingOptions\" ACTION="INSTALL"
SOURCEDIR="Z:\" CLIENTPROCESSID="2222" CLIENTUILEVEL="0"
ADDLOCAL=etc[/code]

(Trivia: This (PDF) is the first InstallShield newsletter tip I ever wrote, in a hotel room in St. Paul, Minnesota, in 2000, which has a bearing on the subject.)

Robert
0 Kudos
Poltron
Level 4

RobertDickau wrote:
I suppose it's that the UI sequence doesn't "do" anything---doesn't make any system changes---so (the thinking presumably goes) why would properties need to trickle back from the Execute sequence process to the UI sequence process?


I can think of a million and 1 reasons for the UI to display properties set in the Execute sequence. Execute makes system changes, the UI displays status of those changes. In programming this is similar to a Model View Controller.

Execute Sequence-Server:
Runs our installscript to set the filename of a shortcut to a pdf of the language the user chose. example (GSM_Enu.pdf). The resulting property, [HELP_FILE], is added as the target value of a shortcut.

UI Sequence-Client:
On the SetupCompleteSuccess dialog we display a button for the user to click that SHOULD open the GSM_Enu.pdf.

Well, it doesn't work because the "Server" won't share it's properties with the "Client", so we have to revert to hacks in order to transfer the information back to the UI. Perhaps I'm missing a simpler way of accomplishing this...
0 Kudos
aditya_c
Level 3

So, what is the best way to launch a custom action that copies the MSI log file, MsiLogFileLocation, to INSTALLDIR?

I would like this CA to fire when the user clicks on Finish from the SetupCompleteSuccess dialog.

PLEASE HELP!
0 Kudos
Kelter
Level 10

i think the logic follows from what Robert was saying. in theory, the installation "knows" everything or has the ability to "know" everything before it launches the execute sequence. if i have an action that sets a directory, then i make sure that action runs in the UI sequence for display purposes. if a dialog needs to display a list of steps that happened during a custom action, then I make that custom action make the necessary calls to update the ListBox table.

i haven't tried this, but perhaps using the Msi Database functions, you could update the property table, instead of calling MsiSetProperty?
0 Kudos