Skip to content

Commit e49f7b0

Browse files
committed
add some snippets which may throw warnings in unusual cases where broken systems report escalated privileges which are not actually true
1 parent 9ac5f18 commit e49f7b0

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

bizhawk_prereqs.nsi

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1+
!include LogicLib.nsh
12
!include "MUI2.nsh"
23
!include "NsisDotNetChecker\DotNetChecker.nsh"
34

5+
; Request application privileges for Windows Vista+
6+
RequestExecutionLevel admin
7+
8+
Function .onInit
9+
UserInfo::GetAccountType
10+
pop $0
11+
${If} $0 != "admin" ;Require admin rights on NT4+
12+
MessageBox mb_iconstop "Administrator rights required!"
13+
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
14+
Quit
15+
${EndIf}
16+
FunctionEnd
17+
18+
419
; The name of the installer
520
Name "BizHawk Prerequisites"
621

722
; The file to write
823
OutFile "bizhawk_prereqs.exe"
924

10-
; The default installation directory
11-
InstallDir $DESKTOP\Example1
12-
1325
; Request application privileges for Windows Vista+
1426
RequestExecutionLevel admin
1527

0 commit comments

Comments
 (0)