View Full Version : How do you get the full path/filename of the setup.exe?

02-09-2005, 05:45 PM
I have a single file distributable, and in a certain circumstance it may be neccessary to reboot in the middle of an installation. I would like my installer to automagically start again when the computer is rebooted....so to do this I want to write an entry into the RunOnce key, but I can't figure out how to get the path/filename to my installation executable...

02-10-2005, 04:04 AM
Does SRCDIR variable give you the folder path you need?

02-10-2005, 08:51 AM
There's also the PACKAGE_LOCATION variable...

02-10-2005, 04:38 PM
There's also the PACKAGE_LOCATION variable...

thats exactly what I was looking for...thanks

02-19-2007, 02:08 AM
I have tried SCDIR and PACKAGE_LOCATION too..but PACKAGE_LOCATION returns me the "".
I have tried on Dev studio 9
also tried on InstallShiled 12 (trial vesion)
can somebody help me?

02-20-2007, 06:22 PM
Just to double-check, what type of project are you using? For an MSI-based installer, SETUPEXEDIR is another possibility.

03-10-2007, 06:39 AM
Hey folks
I have come up with a solution when nothing is working, just try calling a dll method using a custom action... which will Enumerate all the processes from the task manager and try to find your desired exe name as image name from processes.

like if the name of the setup.exe is "Mysetup.exe" and you no this patter is followed then you can try searching for a keyword as "My*.exe" in the enumerated processed

03-20-2007, 05:41 PM
I see your post is pretty old, but if anybody else has this problem, try the following:

nBuffer = 1024;
MsiGetProperty(ISMSI_HANDLE, "SETUPEXEDIR", sSetupExeDir, nBuffer);

sSetupExeDir will return the directory of your setup.exe.

04-13-2007, 04:35 PM
if you directly run the setup.exe from web ..SETUPEXEDIR returns a wrong
path ...C:\Documents and Settings\..\Local Settings\Temporary Internet Files\ Content.IE5\M3GZQJWZ. Iam using Installscript MSI project ,Installshield professional 12 for windows . Is there any way to get the temporary dowloaded location correctly