VirtualBox

Changeset 35651 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 20, 2011 2:15:49 PM (14 years ago)
Author:
vboxsync
Message:

Windows Guest Additions installer: Use new VBoxDrvInst command line, add DIFxAPI.dll, clean up, some NT4 renaming.

Location:
trunk/src/VBox/Additions/WINNT/Installer
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r35579 r35651  
    178178        -E 'PATH_TARGET_X86=$(subst /,\,$(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj)' \
    179179        -E 'VBOX_PATH_ADDITIONS_WIN_X86=$(subst /,\,$(VBOX_PATH_ADDITIONS.win.x86))' \
     180        -E 'VBOX_PATH_DIFX=$(subst /,\,$(VBOX_PATH_DIFX))' \
    180181        -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
    181182        -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi

    r35365 r35651  
    22!if $%BUILD_TYPE% == "debug"
    33  !define _DEBUG     ; Turn this on to get extra output
     4!endif
     5
     6!ifdef _DEBUG
     7  ; Scratch directory for plugin tests
     8  !addincludedir .\PluginTest
     9  !addplugindir .\PluginTest
    410!endif
    511
     
    555561!endif
    556562
     563  FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"
    557564  FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe"
    558565
     
    636643  Call Common_CopyFiles
    637644
    638   Call NT_Main
     645  Call NT4_Main
    639646  goto success
    640647!endif
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r35365 r35651  
    6666  ; WDDM Video driver
    6767  SetOutPath "$0\VBoxVideoWddm"
    68    
     68
    6969  !ifdef VBOX_SIGN_ADDITIONS
    7070    FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
     
    8686    FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
    8787  !endif ; $%VBOX_WITH_CROGL% == "1"
    88      
     88
    8989  !if $%BUILD_TARGET_ARCH% == "amd64"
    9090    FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
     
    155155  SetOutPath "$0\Tools"
    156156  FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe"
     157  FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"
    157158
    158159!if $%BUILD_TARGET_ARCH% == "x86"
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsNT4.nsh

    r34099 r35651  
    11
    2 Function NT_SetVideoResolution
     2Function NT4_SetVideoResolution
    33
    44  ; Check for all required parameters
     
    1010missingParms:
    1111
    12   DetailPrint "Missing display parameters for NT, setting default (640x480, 8 BPP) ..."
     12  DetailPrint "Missing display parameters for NT4, setting default (640x480, 8 BPP) ..."
    1313
    1414  StrCpy $g_iScreenX '640'   ; Default value
     
    2121haveParms:
    2222
    23   DetailPrint "Setting display parameters for NT ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
     23  DetailPrint "Setting display parameters for NT4 ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
    2424
    2525  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.BitsPerPel" $g_iScreenBpp
     
    3333FunctionEnd
    3434
    35 Function NT_SaveMouseDriverInfo
     35Function NT4_SaveMouseDriverInfo
    3636
    3737  Push $0
     
    7272FunctionEnd
    7373
    74 Function NT_Prepare
     74Function NT4_Prepare
    7575
    7676  ${If} $g_bNoVBoxServiceExit == "false"
     
    9292FunctionEnd
    9393
    94 Function NT_CopyFiles
    95 
    96   DetailPrint "Copying files..."
     94Function NT4_CopyFiles
     95
     96  DetailPrint "Copying files for NT4 ..."
    9797
    9898  SetOutPath "$INSTDIR"
     
    119119FunctionEnd
    120120
    121 Function NT_InstallFiles
    122 
    123   DetailPrint "Installing Drivers..."
     121Function NT4_InstallFiles
     122
     123  DetailPrint "Installing drivers for NT4 ..."
    124124
    125125  ; Install guest driver
    126   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /createsvc "VBoxGuest" "VBoxGuest Support Driver" 1 1 "$SYSDIR\drivers\VBoxGuestNT.sys" "Base"'
     126  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxGuest" "VBoxGuest Support Driver" 1 1 "$SYSDIR\drivers\VBoxGuestNT.sys" "Base"'
    127127
    128128  ; Bugfix: Set "Start" to 1, otherwise, VBoxGuest won't start on boot-up!
     
    143143  ; Create the VBoxService service
    144144  ; No need to stop/remove the service here! Do this only on uninstallation!
    145   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /createsvc "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxServiceNT.exe" "Base"'
     145  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxServiceNT.exe" "Base"'
    146146
    147147   ; Create the Shared Folders service ...
     
    161161
    162162  ; Add the shared folders network provider
    163   ;nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider VBoxSF'
     163  ;nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF'
    164164  ;Pop $0                      ; Ret value
    165 
    166 !ifdef _DEBUG
    167   ;DetailPrint "VBoxDrvInst::AddProvider VBoxSF: $0"
    168 !endif
    169 
    170165  ;IntCmp $0 0 +1 error error  ; Check ret value (0=OK, 1=Error)
    171166
     
    173168
    174169error:
    175   Abort "ERROR: Could not install files for Windows NT! Installation aborted."
     170  Abort "ERROR: Could not install files for Windows NT4! Installation aborted."
    176171
    177172done:
     
    179174FunctionEnd
    180175
    181 Function NT_Main
     176Function NT4_Main
    182177
    183178  SetOutPath "$INSTDIR"
    184179
    185   Call NT_Prepare
    186   Call NT_CopyFiles
     180  Call NT4_Prepare
     181  Call NT4_CopyFiles
    187182
    188183  ; This removes the flag "new display driver installed on the next bootup
    189184  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "VBoxGuestInst" '"$INSTDIR\RegCleanup.exe"'
    190185
    191   Call NT_SaveMouseDriverInfo
    192   Call NT_InstallFiles
    193   Call NT_SetVideoResolution
     186  Call NT4_SaveMouseDriverInfo
     187  Call NT4_InstallFiles
     188  Call NT4_SetVideoResolution
    194189
    195190  ; Write mouse driver name to registry overwriting the default name
     
    198193FunctionEnd
    199194
    200 !macro NT_UninstallInstDir un
    201 Function ${un}NT_UninstallInstDir
     195!macro NT4_UninstallInstDir un
     196Function ${un}NT4_UninstallInstDir
    202197
    203198  ; Delete remaining files
     
    207202FunctionEnd
    208203!macroend
    209 !insertmacro NT_UninstallInstDir ""
    210 !insertmacro NT_UninstallInstDir "un."
    211 
    212 !macro NT_Uninstall un
    213 Function ${un}NT_Uninstall
     204!insertmacro NT4_UninstallInstDir ""
     205!insertmacro NT4_UninstallInstDir "un."
     206
     207!macro NT4_Uninstall un
     208Function ${un}NT4_Uninstall
    214209
    215210  Push $0
    216211
    217212  ; Remove the guest driver service
    218   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxGuest'
     213  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'
    219214  Delete /REBOOTOK "$SYSDIR\drivers\VBoxGuestNT.sys"
    220215
    221216  ; Delete the VBoxService service
    222217  Call ${un}StopVBoxService
    223   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxService'
     218  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService'
    224219  Pop $0    ; Ret value
    225220  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
     
    230225  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
    231226  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "VBoxTrayDel" "$SYSDIR\cmd.exe /c del /F /Q $SYSDIR\VBoxTray.exe"
    232   Delete /REBOOTOK "$SYSDIR\VBoxTray.exe"    ; If it can't be removed cause it's running, try next boot with "RunOnce" key above!
     227  Delete /REBOOTOK "$SYSDIR\VBoxTray.exe" ; If it can't be removed cause it's running, try next boot with "RunOnce" key above!
    233228  Delete /REBOOTOK "$SYSDIR\VBoxHook.dll"
    234229
     
    237232
    238233  ; Delete the VBoxVideo service
    239   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxVideo'
     234  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'
    240235
    241236  ; Delete the VBox video driver files
     
    259254FunctionEnd
    260255!macroend
    261 !insertmacro NT_Uninstall ""
    262 !insertmacro NT_Uninstall "un."
     256!insertmacro NT4_Uninstall ""
     257!insertmacro NT4_Uninstall "un."
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstall.nsh

    r34677 r35651  
    1 
    2 ; @todo Replace this crappy stuff with a "VBoxDrvInst /delnetprovider"
    3 !macro RemoveFromProvider un
    4 Function ${un}RemoveFromProvider
    5   Exch $0
    6   Push $1
    7   Push $2
    8   Push $3
    9   Push $4
    10   Push $5
    11   Push $6
    12 
    13   ReadRegStr $1 HKLM "$R0" "ProviderOrder"
    14   StrCpy $5 $1 1 -1 # copy last char
    15   StrCmp $5 "," +2 # if last char != ,
    16   StrCpy $1 "$1," # append ,
    17   Push $1
    18   Push "$0,"
    19   Call ${un}StrStr ; Find `$0,` in $1
    20   Pop $2 ; pos of our dir
    21   StrCmp $2 "" unRemoveFromPath_done
    22   ; else, it is in path
    23   # $0 - path to add
    24   # $1 - path var
    25   StrLen $3 "$0,"
    26   StrLen $4 $2
    27   StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
    28   StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
    29   StrCpy $3 $5$6
    30 
    31   StrCpy $5 $3 1 -1 # copy last char
    32   StrCmp $5 "," 0 +2 # if last char == ,
    33   StrCpy $3 $3 -1 # remove last char
    34 
    35   WriteRegStr HKLM "$R0" "ProviderOrder" $3
    36 
    37 unRemoveFromPath_done:
    38   Pop $6
    39   Pop $5
    40   Pop $4
    41   Pop $3
    42   Pop $2
    43   Pop $1
    44   Pop $0
    45 FunctionEnd
    46 !macroend
    47 !insertmacro RemoveFromProvider ""
    48 !insertmacro RemoveFromProvider "un."
    49 
    50 !macro RemoveProvider un
    51 Function ${un}RemoveProvider
    52   Push $R0
    53   StrCpy $R0 "VBoxSF"
    54   Push $R0
    55   StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder"
    56   Call ${un}RemoveFromProvider
    57   StrCpy $R0 "VBoxSF"
    58   Push $R0
    59   StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order"
    60   Call ${un}RemoveFromProvider
    61   Pop $R0
    62 FunctionEnd
    63 !macroend
    64 !insertmacro RemoveProvider ""
    65 !insertmacro RemoveProvider "un."
    661
    672!macro UninstallCommon un
     
    749  ; Remove common files
    7510  Delete /REBOOTOK "$INSTDIR\VBoxDrvInst.exe"
     11  Delete /REBOOTOK "$INSTDIR\DIFxAPI.dll"
    7612
    7713  Delete /REBOOTOK "$INSTDIR\VBoxVideo.inf"
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsVista.nsh

    r31864 r35651  
    1919
    2020  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 
     21  ; Nothing here yet
    2822  Goto done
    2923
     
    6458   Delete /REBOOTOK "$g_strSystemDir\VBoxCredProv.dll"
    6559
    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 
    7360FunctionEnd
    7461!macroend
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh

    r35365 r35651  
    2626    ; Or: \Registry\Machine\System\CurrentControlSet\Control\Video\vboxvideo\Device0
    2727    ; Result: Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
    28     Push "$tmp"     ; String
    29     Push "\"        ; SubString
    30     Push ">"        ; SearchDirection
    31     Push ">"        ; StrInclusionDirection
    32     Push "0"        ; IncludeSubString
    33     Push "2"        ; Loops
    34     Push "0"        ; CaseSensitive
     28    Push "$tmp" ; String
     29    Push "\" ; SubString
     30    Push ">" ; SearchDirection
     31    Push ">" ; StrInclusionDirection
     32    Push "0" ; IncludeSubString
     33    Push "2" ; Loops
     34    Push "0" ; CaseSensitive
    3535    Call StrStrAdv
    36     Pop $tmppath    ; $1 only contains the full path
     36    Pop $tmppath ; $1 only contains the full path
    3737    StrCmp $tmppath "" dev_not_found
    3838
     
    112112
    113113  ; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format
    114   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'
    115   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'
    116   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD'
     114  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'
     115  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'
     116  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD'
    117117
    118118  ; ... and tell Windows to use that mode on next start!
     
    177177  FILE "$%PATH_OUT%\bin\additions\VBCoInst.dll"
    178178  FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
    179   FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe"  ; Not used by W2K and up, but required by the .INF file
     179  FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe" ; Not used by W2K and up, but required by the .INF file
    180180
    181181  ; WHQL fake
     
    193193    ; WDDM Video driver
    194194    SetOutPath "$INSTDIR"
    195    
     195
    196196    !ifdef VBOX_SIGN_ADDITIONS
    197197      FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
     
    213213      FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
    214214    !endif ; $%VBOX_WITH_CROGL% == "1"
    215      
     215
    216216    !if $%BUILD_TARGET_ARCH% == "amd64"
    217217      FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
     
    230230      !endif ; $%VBOX_WITH_CROGL% == "1"
    231231    !endif ; $%BUILD_TARGET_ARCH% == "amd64"
    232      
     232
    233233    Goto doneCr
    234234  ${EndIf}
     
    323323  DetailPrint "Installing Drivers..."
    324324
     325  Push $0 ; For fetching results
     326
    325327drv_video:
    326328
     
    329331  ${If} $g_bWithWDDM == "true"
    330332    DetailPrint "Installing WDDM video driver ..."
    331     nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /i "PCI\VEN_80EE&DEV_BEEF&SUBSYS_00000000&REV_00" "$INSTDIR\VBoxVideoWddm.inf" "Display"'
     333    nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf"'
    332334  ${Else}
    333335    DetailPrint "Installing video driver ..."
    334     nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /i "PCI\VEN_80EE&DEV_BEEF&SUBSYS_00000000&REV_00" "$INSTDIR\VBoxVideo.inf" "Display"'
    335   ${EndIf}
    336   Pop $0                      ; Ret value
     336    nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideo.inf"'
     337  ${EndIf}
     338  Pop $0 ; Ret value
    337339  LogText "Video driver result: $0"
    338   IntCmp $0 0 +1 error error  ; Check ret value (0=OK, 1=Error)
     340  IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
    339341
    340342drv_guest:
     
    342344  StrCmp $g_bNoGuestDrv "true" drv_mouse
    343345  DetailPrint "Installing guest driver ..."
    344   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /i "PCI\VEN_80EE&DEV_CAFE&SUBSYS_00000000&REV_00" "$INSTDIR\VBoxGuest.inf" "Media"'
    345   Pop $0                      ; Ret value
     346  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxGuest.inf"'
     347  Pop $0 ; Ret value
    346348  LogText "Guest driver result: $0"
    347349  IntCmp $0 0 +1 error error  ; Check ret value (0=OK, 1=Error)
     
    351353  StrCmp $g_bNoMouseDrv "true" vbox_service
    352354  DetailPrint "Installing mouse filter ..."
    353   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /inf "$INSTDIR\VBoxMouse.inf"'
    354   Pop $0                      ; Ret value
     355  ; The mouse filter does not contain any device IDs but a "DefaultInstall" section;
     356  ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented
     357  ; with VBoxDrvInst's "driver executeinf" routine
     358  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver executeinf "$INSTDIR\VBoxMouse.inf"'
     359  Pop $0  ; Ret value
    355360  LogText "Mouse driver returned: $0"
    356361  IntCmp $0 0 +1 error error  ; Check ret value (0=OK, 1=Error)
     
    362367  ; Create the VBoxService service
    363368  ; No need to stop/remove the service here! Do this only on uninstallation!
    364   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /createsvc "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"'
    365   Pop $0                      ; Ret value
     369  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"'
     370  Pop $0 ; Ret value
    366371  LogText "VBoxService returned: $0"
    367372
     
    375380  ; Create the Shared Folders service ...
    376381  ; No need to stop/remove the service here! Do this only on uninstallation!
    377   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /createsvc "VBoxSF" "VirtualBox Shared Folders" 2 1 "system32\drivers\VBoxSF.sys" "NetworkProvider"'
     382  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxSF" "VirtualBox Shared Folders" 2 1 "system32\drivers\VBoxSF.sys" "NetworkProvider"'
    378383
    379384  ; ... and the link to the network provider
     
    383388
    384389  ; Add default network providers (if not present or corrupted)
    385   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider WebClient'
    386   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider LanmanWorkstation'
    387   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider RDPNP'
     390  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add WebClient'
     391  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add LanmanWorkstation'
     392  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add RDPNP'
    388393
    389394  ; Add the shared folders network provider
    390395  DetailPrint "Adding network provider (Order = $g_iSfOrder) ..."
    391   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider VBoxSF $g_iSfOrder'
    392   Pop $0                      ; Ret value
     396  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF $g_iSfOrder'
     397  Pop $0 ; Ret value
    393398  IntCmp $0 0 +1 error error  ; Check ret value (0=OK, 1=Error)
    394399
     
    427432done:
    428433
     434  Pop $0
     435
    429436FunctionEnd
    430437
     
    472479  Delete /REBOOTOK "$INSTDIR\VBoxControl.exe"
    473480  Delete /REBOOTOK "$INSTDIR\VBoxService.exe" ; File from an older installation maybe, not present here anymore
    474  
     481
    475482!if $%VBOX_WITH_WDDM% == "1"
    476483  Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
     
    489496    Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
    490497    Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
    491     ; try to delete libWine in case it is there from old installation
     498    ; Try to delete libWine in case it is there from old installation
    492499    Delete /REBOOTOK "$%PATH_OUT%\bin\additions\libWine.dll"
    493      
     500
    494501  !if $%BUILD_TARGET_ARCH% == "amd64"
    495502    Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
     
    527534  Push $0
    528535
    529   ; Remove VirtualBox graphics adapter & PCI base drivers
    530   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /u "PCI\VEN_80EE&DEV_BEEF&SUBSYS_00000000&REV_00"'
    531   Pop $0    ; Ret value
     536  ; Remove VirtualBox video driver
     537  DetailPrint "Uninstalling video driver ..."
     538  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideo.inf'
     539  Pop $0 ; Ret value
    532540  ; @todo Add error handling here!
    533 
    534   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /u "PCI\VEN_80EE&DEV_CAFE&SUBSYS_00000000&REV_00"'
    535   Pop $0    ; Ret value
    536   ; @todo Add error handling here!
    537 
    538   ; @todo restore old drivers
     541  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'
     542  Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
     543  Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
    539544
    540545  ; Remove video driver
    541546!if $%VBOX_WITH_WDDM% == "1"
    542   ; always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
    543   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxVideoWddm'
     547  DetailPrint "Uninstalling WDDM video driver ..."
     548  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf"'
     549  Pop $0 ; Ret value
     550  ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
     551  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoWddm'
     552  Pop $0 ; Ret value
    544553  ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
    545   ;       could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled 
     554  ;       could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
    546555  Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoWddm.sys"
    547556  Delete /REBOOTOK "$g_strSystemDir\VBoxDispD3D.dll"
    548557!endif ; $%VBOX_WITH_WDDM% == "1"
    549   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxVideo'
    550   Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
    551   Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
    552 
    553   ; Remove mouse driver
    554   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxMouse'
    555   Pop $0    ; Ret value
    556   Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
    557   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /reg_delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"'
    558   Pop $0    ; Ret value
    559   ; @todo Add error handling here!
    560 
    561   ; Delete the VBoxService service
    562   Call ${un}StopVBoxService
    563   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxService'
    564   Pop $0    ; Ret value
    565   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
    566   Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
    567 
    568   ; GINA
    569   Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
    570   ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
    571   ${If} $0 == "VBoxGINA.dll"
    572     DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
    573   ${EndIf}
    574 
    575   ; Delete VBoxTray
    576   Call ${un}StopVBoxTray
    577   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
    578 
    579   ; Remove guest driver
    580   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxGuest'
    581   Pop $0    ; Ret value
    582   Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
    583   Delete /REBOOTOK "$g_strSystemDir\vbcoinst.dll"
    584   Delete /REBOOTOK "$g_strSystemDir\VBoxTray.exe"
    585   Delete /REBOOTOK "$g_strSystemDir\VBoxHook.dll"
    586   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"      ; Remove VBoxTray autorun
    587   Delete /REBOOTOK "$g_strSystemDir\VBoxControl.exe"
    588 
    589   ; Remove shared folders driver
    590   call ${un}RemoveProvider                        ; Remove Shared Folders network provider from registry
    591                                                   ; @todo Add a /delnetprovider to VBoxDrvInst for doing this job!
    592   nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxSF'
    593   Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll"        ; The network provider DLL will be locked
    594   Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxSF.sys"
    595558
    596559!if $%VBOX_WITH_CROGL% == "1"
     
    667630!endif ; VBOX_WITH_CROGL
    668631
     632  ; Remove mouse driver
     633  DetailPrint "Removing mouse driver ..."
     634  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxMouse'
     635  Pop $0 ; Ret value
     636  Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
     637  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"'
     638  Pop $0 ; Ret value
     639  ; @todo Add error handling here!
     640
     641  ; Delete the VBoxService service
     642  Call ${un}StopVBoxService
     643  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService'
     644  Pop $0 ; Ret value
     645  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
     646  Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
     647
     648  ; GINA
     649  Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
     650  ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
     651  ${If} $0 == "VBoxGINA.dll"
     652    DetailPrint "Removing GINA ..."
     653    DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
     654  ${EndIf}
     655
     656  ; Delete VBoxTray
     657  Call ${un}StopVBoxTray
     658  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
     659
     660  ; Remove guest driver
     661  DetailPrint "Removing guest driver ..."
     662  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxGuest.inf"'
     663  Pop $0 ; Ret value
     664  ; @todo Add error handling here!
     665
     666  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'
     667  Pop $0 ; Ret value
     668  Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
     669  Delete /REBOOTOK "$g_strSystemDir\vbcoinst.dll"
     670  Delete /REBOOTOK "$g_strSystemDir\VBoxTray.exe"
     671  Delete /REBOOTOK "$g_strSystemDir\VBoxHook.dll"
     672  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray" ; Remove VBoxTray autorun
     673  Delete /REBOOTOK "$g_strSystemDir\VBoxControl.exe"
     674
     675  ; Remove shared folders driver
     676  DetailPrint "Removing shared folders driver ..."
     677  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider remove VBoxSF'
     678  Pop $0 ; Ret value
     679  nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxSF'
     680  Pop $0 ; Ret value
     681  Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll"   ; The network provider DLL will be locked
     682  Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxSF.sys"
     683
    669684  Pop $0
    670685
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette