|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Junior Member
Join Date: Sep 2018
Posts: 5
|
Writing unsupported AppCompatFlags value on 64-bit Windows
Hello, my dear,
I would like to know how to create the Layers directory via NSIS [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers] On a blank machine this directory does not exist and I put this in my script WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "C:\application,exe" "~ RUNASADMIN WIN7RTM" and it does not create it. You can come to my help. |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,333
|
Is the application you want to set the appcompat flag for 32-bit or 64-bit?
You are not really supposed to set these flags, the user is supposed to set them. You as a application author should just fix your application so it does not require hacks! See also: https://blogs.msdn.microsoft.com/old...1-00/?p=14643/ IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Sep 2018
Posts: 5
|
Yes, our application is concerned with running Windows10 usually in 64bit.
And I wish to automate the registration of these rights on our executables when we install a new machine in our customers. Just to avoid having to manually right click on the executable and run in Windows7 and admin compatibility |
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,333
|
So you are choosing to ignore Microsoft's advice and set a value you are not really supposed to set instead of fixing your application?
To set a compatibility flag for a 64-bit application you must detect if you are on 64-bit Windows with the macro in x64.nsh and if that is the case you can call "SetRegView 64" to change to the 64-bit registry view. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|