Accessing files in %windir%\system32 folder from 32-bit MSI

Got a problem you cannot solve? Try here.
mdavtec
Posts: 27
Joined: Wed Jan 20, 2016 2:59 pm

Accessing files in %windir%\system32 folder from 32-bit MSI

Postby mdavtec » 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.
ExchA

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Accessing files in %windir%\system32 folder from 32-bit MSI

Postby FrancescoT » Wed Feb 08, 2017 1:03 pm

Dear Mdavtec,

you should instead;

Code: Select all

Set Variable FILE_VERSION to
Set Variable WINSYSDIR_X64 to
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Get Folder Location System->System Directory into WINSYSDIR_X64
Get File Version $WINSYSDIR_X64$\FOO.dll into Variable FILE_VERSION
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode


Code: Select all

~InstallAware Clipboard Data~
~Set 64 Bit Mode~
~{3C376276-B816-4D0C-967F-3EB452474B37}~
~TRUE~
~FALSE~
~FALSE~
~Get File Version~
~{C6CF712A-6EDA-430C-9BAD-D09A6B24A2DC}~
~$WINSYSDIR_X64$\FOO.dll~
~FILE_VERSION~
~Get Folder Location~
~{C57664B0-24CD-4A93-AD2D-41A16D3CB0B8}~
~WINSYSDIR_X64~
~23~
~FALSE~
~Set 64 Bit Mode~
~{C4B0AC1B-0488-4FAC-9D70-DDB44965AC47}~
~FALSE~
~FALSE~
~TRUE~
~Set Variable~
~{2505D5F8-0F86-4A10-8E86-A65F5EC8B080}~
~WINSYSDIR_X64$MYAH$MYAH$FALSE~
~~
~Set Variable~
~{7929DAD6-89AE-415D-8F7F-01C9753FAB99}~
~FILE_VERSION$MYAH$MYAH$FALSE~
~~

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

mdavtec
Posts: 27
Joined: Wed Jan 20, 2016 2:59 pm

Re: Accessing files in %windir%\system32 folder from 32-bit MSI

Postby mdavtec » Wed Feb 15, 2017 2:33 pm

Thanks for the reply. That was helpful in resolving the issue.

I'm, in general, curious about this 32-bit or 64-bit installation. Does InstallAware has any documentation giving details and providing guidelines to users. Some of the questions I've,
- Can I use 32-bit installation program to install 64-bit application?
- What user should do if application is supported on both, x86 and x64, platform?

Thanks.
ExchA

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Accessing files in %windir%\system32 folder from 32-bit MSI

Postby FrancescoT » Mon Feb 20, 2017 1:16 pm

Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 49 guests