Accessing files in %windir%\system32 folder from 32-bit MSI
Posted: Wed Feb 08, 2017 10:15 am
My MSI file is build as 32-bit and I want to file version of a DLL in %windir%\system32 folder. I tried using "Set 64 Bit Mode" command and then use $WINSYSDIR$ folder.
++
~InstallAware Clipboard Data~
~Get File Version~
~{0A88D5B9-6674-4960-98DA-5FEEB9B462CE}~
~$WINSYSDIR$\FOO.dll~
~DLLFileVersion~
~Set 64 Bit Mode~
~{36CB7CDA-B4B1-41B1-81D5-0C2A281D67CF}~
~FALSE~
~FALSE~
~TRUE~
++
But this is now working. It still get file version of DLL in SysWow64 folder. Any suggestion what can I do here? Also if I want to revert back to original mode, i.e. undo Set 64 bit mode, how would I do that.
I see following Warning in your online help fo "Set 64 bit Mode".
When applications are running on 64 bit Windows in 32 bit compatibility mode, Windows redirects file system and registry access to alternate 32 bit compatibility locations. This may cause undesired behavior with your setup if you call the Set 64 Bit Mode command after other commands that access the file system and registry.
Is that the reason, I'm not able to access file in System32.
++
~InstallAware Clipboard Data~
~Get File Version~
~{0A88D5B9-6674-4960-98DA-5FEEB9B462CE}~
~$WINSYSDIR$\FOO.dll~
~DLLFileVersion~
~Set 64 Bit Mode~
~{36CB7CDA-B4B1-41B1-81D5-0C2A281D67CF}~
~FALSE~
~FALSE~
~TRUE~
++
But this is now working. It still get file version of DLL in SysWow64 folder. Any suggestion what can I do here? Also if I want to revert back to original mode, i.e. undo Set 64 bit mode, how would I do that.
I see following Warning in your online help fo "Set 64 bit Mode".
When applications are running on 64 bit Windows in 32 bit compatibility mode, Windows redirects file system and registry access to alternate 32 bit compatibility locations. This may cause undesired behavior with your setup if you call the Set 64 Bit Mode command after other commands that access the file system and registry.
Is that the reason, I'm not able to access file in System32.