cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
slavdok
Level 2

Setupexename

Hi

I have an InstallScript MSI Project file that I am editing with InstallShield 2011

I am trying to get the setup's filename. I found code that says to use SETUPEXEDIR and SETUPEXENAME

When I try that, the compiler writes an error that these are undefined identifiers.

The original code was written in earlier versions of InstallShield, if that makes a difference

Thank you
Labels (1)
0 Kudos
(4) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

SETUPEXEDIR and SETUPEXENAME are MSI properties. You can obtain their values through the MsiGetProperty function.
0 Kudos
BrHartmann
Level 7

I've been using this with MsiGetProperty for awhile in Installscript MSI, but recently I needed to build a pure Installscript bootstrapper project (no MSI), and need to access what the actual exe filename is. After a quick search in forums and help file, I found one option that looked promising -- I tried DISK1SETUPEXENAME, but this proved to be hard-coded to "setup.exe", so that didn't work. Is there another handy way to get this information in installscript?
0 Kudos
BrHartmann
Level 7

Based on further research it looks like I can use the PACKAGE_LOCATION system variable and then manipulate the string to filter out the directory information to get just the filename. I'd still be interested to hear if there is a more efficient way to grab ONLY the filename. Thanks.
0 Kudos
BrHartmann
Level 7

Nevermind, thought it would be trickier, but it's just a 1 line solution:

ParsePath(svSetupExeFileName, PACKAGE_LOCATION, FILENAME);
0 Kudos