This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: SETUPEXEDIR property not recognized
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2009
04:39 PM
SETUPEXEDIR property not recognized
Hello,
I have an IS 2009 Installscript MSI project (using compressed setup.exe file) where the SETUPEXEDIR property is not recognized by the IDE. Quite simply, when I type it in setup.rul, the IDE treats it as normal text.
Is this a bug? I'm trying to use this property because using ParsePath with PACKAGE_LOCATION and DISK is returning an empty string, and I need for my installation to know the location of setup.exe.
Thanks very much for any assistance, as this has grown quite frustrating... :confused:
I have an IS 2009 Installscript MSI project (using compressed setup.exe file) where the SETUPEXEDIR property is not recognized by the IDE. Quite simply, when I type it in setup.rul, the IDE treats it as normal text.
Is this a bug? I'm trying to use this property because using ParsePath with PACKAGE_LOCATION and DISK is returning an empty string, and I need for my installation to know the location of setup.exe.
Thanks very much for any assistance, as this has grown quite frustrating... :confused:
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2009
05:10 PM
SETUPEXEDIR is set as an MSI property. It is not available as an InstallScript variable such as PACKAGE_LOCATION or SRCDIR. To get the value of the SETUPEXEDIR property, use the MsiGetProperty API:
This code will work in InstallScript events and custom actions scheduled for immediate execution.
nBufferSize = MAX_PATH;
MsiGetProperty(ISMSI_HANDLE, "SETUPEXEDIR", svSetupExeDir);
This code will work in InstallScript events and custom actions scheduled for immediate execution.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2009
09:22 AM
Thanks, Josh, I appreciate the explanation.
When I then include the following in my setup.rul:
nResult = ParsePath(svReturnString, svSetupExeDir, DISK);
I get an empty string when I output the result. I'm verifying that ParsePath is not erroring. Any ideas on that? I was hoping that using SETUPEXEDIR rather than PACKAGE_LOCATION would solve that problem.
Thanks...
When I then include the following in my setup.rul:
nResult = ParsePath(svReturnString, svSetupExeDir, DISK);
I get an empty string when I output the result. I'm verifying that ParsePath is not erroring. Any ideas on that? I was hoping that using SETUPEXEDIR rather than PACKAGE_LOCATION would solve that problem.
Thanks...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 12, 2009
11:01 AM
I ended up adding a trailing "\\" to svSetupExeDir, i.e., svSetupExeDir = svSetupExeDir + "\\"; before calling ParsePath, and it's now working. Thanks again.