Unfortunately, Windows XP and Windows Server 2003 don't have this feature; and since we still work with both of these versions of Windows, I cannot incorporate it into our code. Anyway, since the original post is one of my more popular, I thought I would update the code.
var /GLOBAL NSISRegPath
StrCpy $NSISRegPath "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
var /GLOBAL EXERegPath
StrCpy $EXERegPath "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
${IF} ${AtLeastWinVista}
WriteRegStr HKLM "$NSISRegPath" "$INSTDIR\program.exe" "DisableNXShowUI"
${IF} ${RunningX64}
ExecWait '$WINDIR\SysNative\reg.exe add "$EXERegPath" /v \
"$INSTDIR\program.exe" /d "DisableNXShowUI"'
${ENDIF}
${ENDIF}
No comments:
Post a Comment