Check folder location of setup.exe

Got a problem you cannot solve? Try here.
Post Reply
AH-NP
Posts: 46
Joined: Mon Jun 11, 2007 8:48 am

Check folder location of setup.exe

Post 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
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
AH-NP
Posts: 46
Joined: Mon Jun 11, 2007 8:48 am

Post by AH-NP »

SFXPATH worked fine for me !
Thanks

AH-NP
Post Reply