Skip to content

Commit

Permalink
add some snippets which may throw warnings in unusual cases where bro…
Browse files Browse the repository at this point in the history
…ken systems report escalated privileges which are not actually true
  • Loading branch information
zeromus committed Jun 16, 2017
1 parent 9ac5f18 commit e49f7b0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions bizhawk_prereqs.nsi
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
!include LogicLib.nsh
!include "MUI2.nsh"
!include "NsisDotNetChecker\DotNetChecker.nsh"

; Request application privileges for Windows Vista+
RequestExecutionLevel admin

Function .onInit
UserInfo::GetAccountType
pop $0
${If} $0 != "admin" ;Require admin rights on NT4+
MessageBox mb_iconstop "Administrator rights required!"
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
Quit
${EndIf}
FunctionEnd


; The name of the installer
Name "BizHawk Prerequisites"

; The file to write
OutFile "bizhawk_prereqs.exe"

; The default installation directory
InstallDir $DESKTOP\Example1

; Request application privileges for Windows Vista+
RequestExecutionLevel admin

Expand Down

0 comments on commit e49f7b0

Please sign in to comment.