Page 1 of 1

Check folder location of setup.exe

Posted: Wed Jun 24, 2009 3:49 am
by AH-NP
Hi,

I’m trying to check if a file is next to my file setup.exe
For example, my setup is in C:\\Test\\Setup.exe
And I want to check if the file Toto.txt is in the folder “C:\\Test\\ “ to.
I want to use Does file/folder exists but I can’t find the way to get the folder location of setup.exe
I’ve tried Pre-Defined variable EXEDIR and ROOTDIR but both give me the temp folder directory (where the setup is uncompressed).
Is there a way to check this easily ?

Thanks

AH-NP

Posted: Wed Jun 24, 2009 7:27 am
by MichaelNesmith
Pasting verbatim from the help file:

EXEDIR: The folder containing the setup executable itself.
EXEFILE: The full path and file name of the setup executable.
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.
SFXFILE: If an uncompressed directory layout is used, this variable is empty. Otherwise set to the file name of the self extracting executable which bootstrapped the installer.
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.

Posted: Thu Jun 25, 2009 4:47 am
by AH-NP
SFXPATH worked fine for me !
Thanks

AH-NP