Old 29th March 2018, 23:41   #1
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 20
reg and bat2nsi-script

Hi all,
there are files of this content:

(..reg)
code:
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)
code:
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,
MaGoth is offline   Reply With Quote
Old 30th March 2018, 00:24   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,844
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th March 2018, 00:46   #3
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 20
Quote:
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,
MaGoth is offline   Reply With Quote
Old 30th March 2018, 11:51   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,844
What have you tried so far? Post your NSIS code and compiler errors (if any)...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th March 2018, 19:20   #5
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 49
What @Anders said.

Did you try WriteRegStr? i.e.,
code:
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"

Nutzzz is offline   Reply With Quote
Old 30th March 2018, 19:25   #6
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 20
Quote:
Originally Posted by Anders View Post
What have you tried so far? Post your NSIS code and compiler errors (if any)...
Uni.:
code:
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\System\Gor.exe" "DisableNXShowUI" "REG_SZ"

MaGoth is offline   Reply With Quote
Old 31st March 2018, 01:12   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,844
Remove the last parameter.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st March 2018, 08:46   #8
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 20
Quote:
Originally Posted by Anders View Post
Remove the last parameter.
Yes, tnx..
MaGoth is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump