Page 1 of 1

GETTING STARTUP PATH

Posted: Tue Jul 12, 2011 8:11 am
by leos58
Hi,
I have a problem with a installaware project and I can't solve it.
My problem is that I have the necessity to getting the current folder path where an user launch an installaware setup.
For example if I have a xxx.exe placed in C:\Dir\Dir1\xxx.exe I want to have a variable that return me C:\Dir\Dir1\.
I tried to search in installaware project but I didn't found any solution.
Some help will be appreciated.
Thanks.
Bye

Re: GETTING STARTUP PATH

Posted: Tue Jul 12, 2011 8:59 am
by giaviv
Hi,

Check out these predefined variables:
EXEDIR: The folder containing the setup executable itself.
SFXPATH: If an uncompressed directory layout is used, this variable is empty. Otherwise set to the full path of the folder containing the self extracting executable which bootstrapped the installer.
GPOPATH: If an uncompressed directory layout is used, this variable is empty. If setup has not been deployed through Group Policy, this variable is empty. Otherwise set to the full path of the folder containing the Single File MSI that started the current installation.

SETUPPATH: This variable provides a convenient mechanism to detect the outermost folder containing the executable program or setup database that initiated the installation. In other words, this value is set to the value of the variable GPOPATH, or SFXPATH, or EXEDIR in that order of priority - until the first variable containing a non-empty value is found.

Re: GETTING STARTUP PATH

Posted: Wed Jul 13, 2011 1:21 am
by leos58
Hi,
Thanks very much for your reply.
Finally I found a solution; SFXPATH work fine for me.
Thanks very much.
Bye.

Re: GETTING STARTUP PATH

Posted: Wed Jul 13, 2011 5:48 pm
by giaviv
You're welcome!