Windows installer - run a subsequent time, select "modify" and run specific steps

69 views Asked by At

I have an installer built in InstallShield 2014 Premier as a basic MSI project. Part of the UI includes an option screen where the user can select Modify, Repair or Remove. If the user selects modify, I want to collect some information in the UI (or public properties set in the command line) and install shortcuts to a custom folder (see this question) then run a DLL custom action. Currently, using the out-of-the-box sequence provided by InstallShield, the custom action gets executed (successfully), and it looks like the create shortcuts is attempted. The installer log shows the set property for the directory holding the shortcuts being executed, and ending up with the expected value. This is an excerpt from the log:

...
MSI (s) (B8:E8) [16:08:08:823]: Doing action: UpdateShortcutFolder
Action 16:08:08: UpdateShortcutFolder. 
Action start 16:08:08: UpdateShortcutFolder.
MSI (s) (B8:E8) [16:08:08:824]: PROPERTY CHANGE: Modifying ENV_FOLDER property. Its current value is 'C:\Program Files (x86)\MyCompany\MyProduct\PROD Environment\'. Its new value: 'C:\Program Files (x86)\MyCompany\MyProduct\TEST Environment'.
Action ended 16:08:08: UpdateShortcutFolder. Return value 1.
...
MSI (s) (B8:E8) [16:08:09:033]: Doing action: CreateShortcuts
Action 16:08:09: CreateShortcuts. Creating shortcuts
Action start 16:08:09: CreateShortcuts.
MSI (s) (B8:E8) [16:08:09:034]: Note: 1: 2205 2:  3: MsiShortcutProperty 
MSI (s) (B8:E8) [16:08:09:034]: Note: 1: 2205 2:  3: MsiShortcutProperty 
Action ended 16:08:09: CreateShortcuts. Return value 1.
...

Is a non-zero return value an indication it succeeded? Other actions that appear to have succeeded return 1 (e.g. set property actions, my DLL custom action). However, the only shortcuts I can find are in the same custom folder as from the original install, and those appear to be unmodified.

It looks to me as if a "modify" just runs through the same steps as the original install (there are no conditions in the InstallExecuteSequence table to indicate otherwise), so I don't see why my shortcuts are not being created. What am I missing?

0

There are 0 answers