1 |
|
---|
2 | Function Vista_CopyFiles
|
---|
3 |
|
---|
4 | SetOutPath "$INSTDIR"
|
---|
5 | SetOverwrite on
|
---|
6 |
|
---|
7 | ; The files are for Vista only, they go into the application directory
|
---|
8 |
|
---|
9 | ; VBoxNET drivers are not tested yet - commented out until officially supported and released
|
---|
10 | ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.inf"
|
---|
11 | ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.sys"
|
---|
12 |
|
---|
13 |
|
---|
14 | FunctionEnd
|
---|
15 |
|
---|
16 | Function Vista_InstallFiles
|
---|
17 |
|
---|
18 | DetailPrint "Installing Drivers for Vista / Windows 7 ..."
|
---|
19 |
|
---|
20 | SetOutPath "$INSTDIR"
|
---|
21 |
|
---|
22 | ; VBoxNET drivers are not tested yet - commented out until officially supported and released
|
---|
23 | ;nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /i "PCI\VEN_1022&DEV_2000&SUBSYS_20001022&REV_40" "$INSTDIR\VBoxNET.inf" "Net"'
|
---|
24 | ;Pop $0 ; Ret value
|
---|
25 | ;IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
|
---|
26 | ;Goto done
|
---|
27 |
|
---|
28 | Goto done
|
---|
29 |
|
---|
30 | error:
|
---|
31 | Abort "ERROR: Could not install files for Vista / Windows 7! Installation aborted."
|
---|
32 |
|
---|
33 | done:
|
---|
34 |
|
---|
35 | FunctionEnd
|
---|
36 |
|
---|
37 | Function Vista_Main
|
---|
38 |
|
---|
39 | Call Vista_CopyFiles
|
---|
40 | Call Vista_InstallFiles
|
---|
41 |
|
---|
42 | FunctionEnd
|
---|
43 |
|
---|
44 | !macro Vista_UninstallInstDir un
|
---|
45 | Function ${un}Vista_UninstallInstDir
|
---|
46 |
|
---|
47 | !if $%BUILD_TARGET_ARCH% == "x86" ; 32-bit
|
---|
48 | Delete /REBOOTOK "$INSTDIR\netamd.inf"
|
---|
49 | Delete /REBOOTOK "$INSTDIR\pcntpci5.cat"
|
---|
50 | Delete /REBOOTOK "$INSTDIR\PCNTPCI5.sys"
|
---|
51 | !endif
|
---|
52 |
|
---|
53 | FunctionEnd
|
---|
54 | !macroend
|
---|
55 | !insertmacro Vista_UninstallInstDir ""
|
---|
56 | !insertmacro Vista_UninstallInstDir "un."
|
---|
57 |
|
---|
58 | !macro Vista_Uninstall un
|
---|
59 | Function ${un}Vista_Uninstall
|
---|
60 |
|
---|
61 | ; Remove credential provider
|
---|
62 | DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
|
---|
63 | DeleteRegKey HKCR "CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
|
---|
64 | Delete /REBOOTOK "$g_strSystemDir\VBoxCredProv.dll"
|
---|
65 |
|
---|
66 | !if $%BUILD_TARGET_ARCH% == "x86" ; 32-bit
|
---|
67 | ; Remove network card driver
|
---|
68 | nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /u "PCI\VEN_1022&DEV_2000&SUBSYS_20001022&REV_40"'
|
---|
69 | Pop $0 ; Ret value
|
---|
70 | ; @todo Add error handling here!
|
---|
71 | !endif
|
---|
72 |
|
---|
73 | FunctionEnd
|
---|
74 | !macroend
|
---|
75 | !insertmacro Vista_Uninstall ""
|
---|
76 | !insertmacro Vista_Uninstall "un."
|
---|