I'm creating an installer which only needs to install 32bit files, they work on both 64 and 32 bit machines.
I'm running the Inno Setup on a 64bit machine and even though the install mode is 32bit the files still end up in the SysWOW64 folder. The Dest directive sets to {sys}
Source: "C:\Users\Lablabla\Documents\Visual Studio 2013\Projects\Test\MyDll.dll"; DestDir: "{sys}"; Flags: 32bit
The weirder thing is that the log shows that the destination is system32 and installation mode as 32-bit
2015-04-12 01:04:14.046 64-bit Windows: Yes
2015-04-12 01:04:14.046 Processor architecture: x64
2015-04-12 01:04:14.046 User privileges: Administrative
2015-04-12 01:04:14.046 64-bit install mode: No
....
2015-04-12 01:04:20.237 Dest filename: C:\Windows\system32\MyDll.dll
But when the setup is done the file is in the SysWOW64 folder, even though the executable file is in the correct place of Program Files (x86)
This happens even when setting the specific 32bit flag to the dll file.
The installation is very simple, only this dll and an executable. No registry or anything more complex.
Anyone experienced such thing?
Thanks
The SysWOW64 folder is the correct place for a 32-bit installation on a 64-bit system, in the same way that the Program Files (x86) folder is the correct place. SysWOW64 is the System32 folder on a 'Windows on Windows 64-bit' installation.
Admittedly, Microsoft should have done a much better job at naming these consistently to avoid confusion! i.e. System32 on a 64-bit installation is really "System64" and SysWOW64 is "System32", just as the plain Program Files is really "Program Files (x64)" if you want to think of it that way. All 32-bit applications run in the WOW64 (Windows 32-bit on Windows 64-bit) emulator on 64-bit Windows.
Related
This question already has answers here:
File/DLL installed to {sys} does not appear in C:\Windows\system32
(1 answer)
How to add x86 and x64 VC++ 2019 Redistributables in single Inno Setup installer?
(1 answer)
Closed 11 months ago.
I have an executable (setup.exe) that is being created using inno studio. for the executable to run I have to install a certain dll, which is libusb0.dll. If the system is a 64 bit I have the 64 bit dll being installed inside the system32 folder, also if the application is a 32 bit, it is installed in the syswow64 folder. Now if the system is a 32 bit I have the directory set to install the 32 bit dll in the system32 folder accordingly .
Although there seems to be another case, for example if the system is 64 bit, but the installer is 32bit, will the installer be able to identify that the system is a 64 bit and install it in the correct directory, which would be the syswow64 folder to install the 32bit dlls, or will it still try and install the 32 bit dll into the system32 folder which would be incorrect since its for 64bit dlls on a 64 bit system? In which case the setup will fail to find the correct dll?
I hope this makes sense, it is a little confusing for me, but would be nice to get someone's opinion on it.
The way I have it implemented in inno studio, is that I'm using Check: Is64BitInstallMode so that it checks the system before placing the respective dlls in the system folders.
I need to create a registry key pointing to a file located in the 32 Bit "Program Files" folder that works under both versions (i.e. x86 and x64) of Windows 7 (and higher), even if the accessing process is a 64Bit process in the x64 environment. This folder is:
C:\Program Files in 32Bit Windows
C:\Program Files (x86) in 64 Bit Windows
My problem currently is, that the %programfiles(x86)% variable is not set on 32 Bit windows. So I do not really know which unique variable I can use on both Windows systems to get to the 32 Bit Program Files folder. Any solution to this weird situation?
I am trying to create a 64-bit installer from an existing 32-bit installer.(Makemsi)
When installing 64-bit on machine with 32-bit already installed, the 32-bit files in the
program folder are not removed and 64-bit files are not installed. When installing 32-bit
on a machine with 64-bit already installed it removes 64-bit files and installs 32-bit
files.
Can anyone help me in understanding what happens When installing 64-bit on machine with
32-bit already installed.
If an application is built on a 32-bit machine, when run on a 64-bit machine, how does it know the .dll is in C:\Program Files (x86) instead of C:\Program Files or it doesn't?
ERROR SUMMARY
[SCRIPT]: File not found: C:\Program Files\Common Files...\abc.dll.
However, in my 64-bit machine, abc.dll is in C:\Program Files (x86)\Common Files...\abc.dll
If it doesn't, where do I adjust the path because apparently it's not in the application's code.
First of all, you can cross-compile in either direction so being built on a 32-bit machine doesn't necessarily mean anything. It is really an issue of running 32-bit code on a 64-bit machine. In this case, there is a 32-bit emulation layer on 64-bit installations called Wow64. Part of this is file system redirection, which redirects file system requests from 32-bit programs. In this case, trying to access "C:\Program Files" from 32-bit code will transparently redirect to "C:\Program Files (x86)".
it doesn't?
No part of the default search path checks anywhere in Program Files or Program Files (x86) unless it is because the directory of the application is under one of those folders.
If you are getting that error from a 32bit application then something is set up unusually (like overriding the default install location under Program Files (x86)).
I have a 32-bit application which also has a device driver. I am using the DIFXAPP support in WiX to install the driver. Is it OK on 64-bit windows to install the application and 64-bit driver files to a subdirectory of Program Files (x86) then have DIFX install the driver to the driver store from there? I believe that it's not allowed to run 64-bit code from the 32-bit Program Files directory but in this case I'm not running it, just asking DIFXAPP to copy it. The actual function used is DriverPackageInstall().
There is a convention to install programs 32-bit programs into the x86 tree, but it is not forbidden. It is legal to copy the DIFXAPP executable and accompanying files into a sub-directory in Program Files (x86) and start it from there.