View Full Version : How to find the INSTALLDIR

07-03-2004, 03:50 AM
Hi All,

I am trying to upgrade the already existing application.I am using InstallShield Developer 8.0.
How to find the INSTALLDIR of the already installed application ?

Kapil P.

07-05-2004, 08:28 AM
Use the MsiGetProductInfo() api to get the previous installdir, but for this to work, the property ARPINSTALLLOCATION needed to be set in the previous installation. If not, then there is no other way unless you have written the location out to a registry key.


07-05-2004, 05:53 PM
If you know one of the component GUIDS from the old install, you could grab the path that this was installed to.

You will need to open the old msi file to find this out.

07-06-2004, 09:22 AM
Thanks for the reply.
I have the old msi file with me.It has not set ARPINSTALLLOCATION property in the previous installation.
I have the component GUIDS with me but I am still not able to get the installdir of the previous installation.
I am new to installshield and using it for the first time If you guys can explain the procedure in detail it may solve my paoblem.

Thanks in Advance.
Kapil P

07-06-2004, 06:02 PM
You will need to open the old msi file
Look inside the directory table and find the INSTALLDIR, or any row that has something like


Means that MYFOLDER is an alias for INSTALLDIR

Then you need to look up the component table and find a component that is always installed under the above folder.

You can then grab this components guid, and use this in the functiuon - MsiGetComponentPath

Alternatively, if that is too hard, you could use the AppSearch and (CompLocator or RegLocator) table to find either a registry key or file that the first install installed.

07-08-2004, 12:45 AM
Hi Luke_s,

Thanks for the reply.

I am using appsearch for a file previously installed.I am doing this in the onbegin function.


Now everything is working fine for me except that the system searches for the file even during the uninstallation.So how can I detect that it is maintenance or uninstallation.
Also I am using onend() function which should not be run during the uninstallation.
Please help me out on how to do this.
Waiting for a Reply.
Kapil P.

07-08-2004, 12:54 AM
Im sorry, i dont have that much experience with install script.

Possibly condition code not to run on REMOVE (property)

01-06-2005, 08:24 AM
Hi Kapil,
You can push your function to OnFirstUIBefore or OnMaintUIBefore depending on your requirement. If you are putting your function in OnBegin, since all the time the installscript starts from this event, the function will get triggered even in uninstall.
Best Regards,