PDA

View Full Version : Setupexename



slavdok
10-07-2010, 02:35 PM
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

joshstechnij
10-11-2010, 06:37 PM
SETUPEXEDIR and SETUPEXENAME are MSI properties. You can obtain their values through the MsiGetProperty function.

BrHartmann
11-22-2010, 04:48 PM
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?

BrHartmann
11-22-2010, 05:30 PM
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.

BrHartmann
11-22-2010, 06:12 PM
Nevermind, thought it would be trickier, but it's just a 1 line solution:

ParsePath(svSetupExeFileName, PACKAGE_LOCATION, FILENAME);