2

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

Robert Wigley
  • 1,917
  • 22
  • 42
La bla bla
  • 8,558
  • 13
  • 60
  • 109

1 Answers1

8

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.

Robert Wigley
  • 1,917
  • 22
  • 42
  • 2
    This is nicely covered in [`this article`](http://www.samlogic.net/articles/32-64-bit-windows-folder-x86-syswow64.htm). – TLama Apr 12 '15 at 00:04
  • Excellent link! Explains 32-bit on 64-bit very clearly. Additionally, the linked articles a well worth a read for further information. – Robert Wigley Apr 12 '15 at 01:27
  • Non the less, why does it states the destination in the log as `Dest filename: C:\Windows\system32\MyDll.dll`? Is there a way to "force" it to be `system32` other than hardcoding it? Thanks for your answer – La bla bla Apr 12 '15 at 19:10
  • I don't know why it shows this in the log. A potential shortcoming of the log. Someone else may be able to shed some light on this. The only way to 'force' it to be in `System32` would be to use `DestDir: "{win}\System32"`. – Robert Wigley Apr 12 '15 at 19:14
  • Thanks. The article by @TLama explains it well. Thanks for the both of you. – La bla bla Apr 12 '15 at 20:02