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: QueryProgItem changes returned path
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
‎Sep 28, 2012
11:05 AM
QueryProgItem changes returned path
OK here is the situation I am experiencing.
I have a custom action that tries to read the shortcut path of the opposite platform version's shortcut using QueryProgItem.
exa (x86 installer reads the shortcut path of the x64 installation shortcut)
Now this function works fine when 64-bit installation reads the 32-bit shortcut. It returns the correct path and all is well.
however the 32-bit installation changes the returned information. Specifically it changes C:\Program Files\ to C:\Program Files (x86)\
- I have made sure of all variables and even spit them out in my log to make sure the script is reading the correct shortcut (the 32 bit shortcut doesn't even exist at the time this custom action executes).
- I have also made sure the variable svCmdLine is used elsewhere in my script and it is not.
Sample of code used:
nResult = QueryProgItem (szFolderName , svShortcutName, svCmdLine, svWrkDir,
svIconPath, nvIconIndex, svShortCutKey, nvMinimizeFlag);
if (nResult = 0) then
SprintfMsiLog("Shortcut Command Line = " + svCmdLine);
This is a Basic MSI running and Installscript Custom Action. The Custom action is Immediate execute running in Execute phase after ISSetupFilesCleanup (last custom action in sequence) Only Runs on Uninstall.
Also Note I use the same custom action inside an Installscript installation (not MSI) and have not had problems so far.
I have a custom action that tries to read the shortcut path of the opposite platform version's shortcut using QueryProgItem.
exa (x86 installer reads the shortcut path of the x64 installation shortcut)
Now this function works fine when 64-bit installation reads the 32-bit shortcut. It returns the correct path and all is well.
however the 32-bit installation changes the returned information. Specifically it changes C:\Program Files\ to C:\Program Files (x86)\
- I have made sure of all variables and even spit them out in my log to make sure the script is reading the correct shortcut (the 32 bit shortcut doesn't even exist at the time this custom action executes).
- I have also made sure the variable svCmdLine is used elsewhere in my script and it is not.
Sample of code used:
nResult = QueryProgItem (szFolderName , svShortcutName, svCmdLine, svWrkDir,
svIconPath, nvIconIndex, svShortCutKey, nvMinimizeFlag);
if (nResult = 0) then
SprintfMsiLog("Shortcut Command Line = " + svCmdLine);
This is a Basic MSI running and Installscript Custom Action. The Custom action is Immediate execute running in Execute phase after ISSetupFilesCleanup (last custom action in sequence) Only Runs on Uninstall.
Also Note I use the same custom action inside an Installscript installation (not MSI) and have not had problems so far.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2012
07:28 AM
I have confirmed this happens on both Windows XP 64-bit and on Windows 7 x64.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 15, 2013
09:34 AM
I figured better late than never. You might try this:
Disable(WOW64FSREDIRECTION);
Disable(WOW64FSREDIRECTION);