Skip to content
⌘ NSIS Forum Archive

reg and bat2nsi-script

8 posts

MaGoth#

reg and bat2nsi-script

Hi all,
there are files of this content:

(..reg)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\MyTools\\Gor1\\system\\GorMod.exe"="DisableNXShowUI"
"C:\\MyTools\\Gor2\\System\\Gor2.exe"="DisableNXShowUI"
(..bat)
reg add '"HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\MyTools\Gor\System\Gor2.exe" /t REG_SZ /f /d DisableNXShowUI'
Help transfer this to a script for NSIS UNICODE 2.46.5.. 🙄


MfG MaGoth, 🙂
Anders#
Read about the registry instructions in the documentation.

That being said, you are not supposed to modify the AppCompatFlags key in a installer, that key is for user preferences. If your application has a bug, it should be fixed instead of hoping that compatibility hacks will take care of the problem.
MaGoth#
Originally Posted by Anders View Post
Read about the registry instructions in the documentation.

That being said, you are not supposed to modify the AppCompatFlags key in a installer, that key is for user preferences. If your application has a bug, it should be fixed instead of hoping that compatibility hacks will take care of the problem.
I read it for a week already, but unfortunately I still could not understand how to transfer this text to the script. 🙁

MfG MaGoth, 🙂
Nutzzz#
What @Anders said.

Did you try WriteRegStr? i.e.,
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "C:\MyTools\Gor1\system\GorMod.exe" "DisableNXShowUI"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "C:\MyTools\Gor2\system\Gor2.exe" "DisableNXShowUI"
MaGoth#
Originally Posted by Anders View Post
What have you tried so far? Post your NSIS code and compiler errors (if any)...
Uni.:
  WriteRegStr HKCU "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\System\Gor.exe" "DisableNXShowUI" "REG_SZ"