-1

I am trying to install a installer developed using InstallShield 2008. While installing after selecting the destination path i am aborting the installation.

When i try to install again by default it is taking the destination path as previously given path which was provided before aborting the installation.

And also it is not allowing me to install in different path.

For Example:

*Step1 : Installation starts

Step2: Destination path as C:\Installer

Step3: Click next and abort installation

Step4: Start the installation again

Step5: Provide Different destination path as C:\Installer1*

Here installation is failed. Because destination is still pointing to Step2

My question is from where Installer is taking the old path.?

user3403111
  • 65
  • 2
  • 9
  • Is this related to programming? ... (otherwise it's not on-topic for [so]) – user202729 Apr 06 '18 at 07:56
  • Did you download the file and try installing again? Is this your own package? You may need to remove temp files and such and then try to run the installer again. You may get some help here with command-line extensions - http://www.itninja.com/ – Leptonator Apr 06 '18 at 07:59
  • After aborting when i install again, if i skip all error messages then the wizard is getting completed. After this if i uninstall from Control Panel and try again it is workiong. I want to know how the installer still retains its old path – user3403111 Apr 06 '18 at 08:02
  • @user202729 yeah related to Installshield which is used to create installers – user3403111 Apr 06 '18 at 08:03

1 Answers1

0

Persisted Path: The technicalities appear to be relatively straightforward: the old path is read back either from the registry or from disk each time the setup is launched, and a custom action in the setup's GUI sequence must have persisted the path "somewhere" during the first run (this is erroneous design, see technical comment below). Reading back the value can be done by using AppSearch (built-in MSI feature) or by means of a custom action.

Registry / Disk: As to finding where the value is read from. The easiest would be to just search the registry first for the literal path. Just open regedit.exe and search for the path there. You can also look for the custom action that does the persisting (or the AppSearch or custom action that does the retrieval) and see if it is a script with code you can see - then you should be able to see where it has persisted the path. Use Orca or a similar tool to view the Custom Action table. The custom action can also be compiled and undecipherable. Do you have the setup source? The path can also be persisted to disk, but the registry is most commonly used. Remember to search both HKCU and HKLM.

Involved Debugging: I can't see why you would, but it is also possible to use ProcMon.exe to monitor what registry locations your MSI reads and / or writes to. This is involved debugging and should never be needed for something this simple. Just mentioning it as a technical option. Generally the last resort we have to figure out the strangest problems.


Technical Comment: MSI setups are not supposed to write anything to the registry or disk from the setup's user interface sequence (setup dialogs). All changes should be made from the installation sequence (InstallExecuteSequence) which also generally runs with elevated rights - the user interface normally runs with user rights. This InstallExecuteSequence sequence is kicked off from the last dialog in the GUI sequence, and runs the file copy and system change operations. Control then returns to the GUI sequence to show the setup complete dialogs. It is also possible to run the setup silently, in which case the InstallUISequence never runs and all custom actions inserted there fail to run. Accordingly custom actions should be present in the InstallExecuteSequence as well as the InstallUISequence if they are to run in silent mode. This potential design flaw is a very common silent deployment error which occurs when setups are not designed properly for silent running. Remember that all corporate deployment runs silently. Setup GUI is highly overrated (in my opinion - a "fact" that could change in the future).

It is still possible for an MSI setup to write to the registry or disk from the InstallUISequence by using a custom action to do so. Such a custom action would normally not have access to write to HKLM or to protected parts of the disk - unless the whole setup runs elevated because it was launched from an elevated command prompt (for example), or launched by an admin who elevates it via the UAC prompt.

In other words: this setup is badly designed, but I guess that is clear already.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • My installer is badly designed or there is a problem with InstallShield itself? – user3403111 Jun 07 '18 at 11:00
  • Your setup must be persisting the path "somewhere" (disk / registry) from the setup's GUI sequence - this is not best practice. Look for the custom action that does this, if you have the setup source available. – Stein Åsmul Jun 07 '18 at 21:01
  • I don't see, and have never seen, a built-in feature in Installshield to persist the installation path in the fashion you describe. This must be implemented in your setup specifically I think. – Stein Åsmul Jun 07 '18 at 22:26