Simple-x264-Launcher/etc/check_os.nsh

39 lines
1021 B
Plaintext
Raw Normal View History

2012-02-09 16:45:42 +01:00
!include "WinVer.nsh"
2012-02-09 14:51:41 +01:00
Function .onInit
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{79d6a7e5-35af-47b1-a7d6-f20d0e5df772}") i .r1 ?e'
Pop $0
${If} $0 <> 0
MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the installer is already running!"
Quit
${EndIf}
2012-02-09 16:45:42 +01:00
2012-02-09 14:51:41 +01:00
; --------
${IfNot} ${IsNT}
2012-02-09 16:45:42 +01:00
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, this application does NOT support Windows 9x !!!"
Quit
${EndIf}
${IfNot} ${AtLeastWinXP}
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, this application requires Windows XP or later!"
2012-02-09 14:51:41 +01:00
Quit
${EndIf}
2012-02-09 16:45:42 +01:00
${If} ${IsWinXP}
${AndIf} ${AtMostServicePack} 1
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, this application requires Service-Pack 2 for Windows XP or later!"
ExecShell "open" "http://www.microsoft.com/download/en/details.aspx?id=24"
Quit
${EndIf}
; --------
UserInfo::GetAccountType
Pop $0
${If} $0 != "Admin"
MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
2012-02-09 14:51:41 +01:00
Quit
${EndIf}
FunctionEnd