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

Uninstalling with /x misses variables

Hi guys,

I use InstallShield 2008 Premiere to deploy my application, using Basic MSI installer. I have some custom actions, and a set data for each one: set
Session.Property("CustomActionData") and split it to get the desired values.
Using msiexec /i {GUID} works, but the problem is, that when I uninstall using /x switch, those variables are not properly set, they are empty. Is there any reason why this happens? This action is right before InstallFinalize in the execution sequence (that may be the problem?).

Best regards,
Daniell
Labels (1)
0 Kudos
(5) Replies
danieluc
Level 6

Just noticed that not all variables are missing, but INSTALLDIR sure does.
This is very interesting, because when uninstall ends, I can see in the log that INSTALLDIR has the right value:
Property(C): INSTALLDIR="C:\Program Files\SoftwareName"
So, then, why it was empty in my CA .. ?
Any idea?

Thanks
0 Kudos
danieluc
Level 6

Ok, I've managed to access the variables by changing InScriptExecution to ImmediateExecution, using Session.Property("INSTALLDIR"), moving the action after InstallFinalize and it works. (the CA is a script that executes some shell commands as some final cleanup, so should be ok)

Now a question: Why I can't use dialogs when uninstalling with /x switch? I have a dialog with the set condition "Installed" and it does not appear when uninstalling ..

Regards,
Daniel
0 Kudos
DLee65
Level 13

I believe that running with /X is equivalent to running /i /qb which never shows the UI, it only runs the Execute sequence.
0 Kudos
danieluc
Level 6

Hi DLee, thanks for the answer.
Does VBScript have something like a message box with 2/3 buttons so I can simulate a dialog? I only need the user to choose an option so I can se a variable. Or maybe is there a full featured dialog in a custom action dll ?

Regards,
Daniel
0 Kudos
TheResearch
Level 6

VB Script has the dialog you prefer. Check for Vb Script MsgBox functions.
0 Kudos