forked from Quirkbot/QuirkbotWindowsDriverInstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.nsi
executable file
·57 lines (50 loc) · 1.64 KB
/
build.nsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
!include WinMessages.nsh
!include LogicLib.nsh
;--------------------------------
;General
Name "Quirkbot drivers installation"
OutFile "Quirkbot-Windows-Drivers-Installer.exe"
InstallDir "$TEMP\quirkbot"
Caption "Quirkbot drivers installation"
VIProductVersion "1.0.0.0"
VIAddVersionKey ProductVersion "1.0.0.0"
VIAddVersionKey FileVersion "1.0"
VIAddVersionKey FileDescription "Quirkbot"
VIAddVersionKey ProductName "Quirkbot"
VIAddVersionKey InternalName "Quirkbot"
VIAddVersionKey LegalCopyright "Quirkbot"
VIAddVersionKey CompanyName Quirkbot
VIAddVersionKey OriginalFilename "Quirkbot-Windows-Drivers-Installer.exe"
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
!define MUI_ICON "quirkbot.ico"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Windows detection
!include x64.nsh
!include WinVer.nsh
;--------------------------------
Section "Install a Driver" InstDriver
SetOutPath $TEMP
File /r drivers\*
${if} ${RunningX64}
ExecWait '"$TEMP\dpinst-amd64.exe" /sw' $1
${Else}
ExecWait '"$TEMP\dpinst-x86.exe" /sw' $1
${EndIf}
DetailPrint "Installation: $1"
${If} $1 > 0
MessageBox MB_OK "Driver installation succeeded!"
${Else}
MessageBox MB_OK "Driver installation failed. Please try again."
${EndIf}
SectionEnd