I'm making an installer for a 32bit app installable on Windows XP 32bit and Seven 32 or 64bit.
Under a 64bit Windows Seven, this app needs to be run in "Windows XP SP3 compatibility mode" due to a third party lib problem.
Also, I run the installer in "admin" exec level (RequestExecutionLevel admin) because I write in the HKLM path.
So in my nsis script I added the following lines:
Which should avoid the Wow6432Node reflection and write directly into this specific key.SetRegView 32
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" $INSTDIR\MyApp.exe WINXPSP3
SetRegView 64
But in Windows Seven x64 it doesn't: it still writes in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers.
Normally it shouldn't be a problem because, if I understand correctly, Windows should take care of the reflection. However, after installation, the compatibility mode for Windows XP SP3 isn't checked in MyApp.exe's properties.
What am I doing wrong ?