cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Michael_Marmack
Level 3

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.
Labels (1)
0 Kudos
(2) Replies
Michael_Marmack
Level 3

I have confirmed this happens on both Windows XP 64-bit and on Windows 7 x64.
0 Kudos
OldBean
Level 5

I figured better late than never. You might try this:

Disable(WOW64FSREDIRECTION);
0 Kudos