Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/Portable-VirtualBox.au3
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,8 @@ If (FileExists(@ScriptDir & "\app32\virtualbox.exe") Or FileExists(@ScriptDir &

SplashOff()

If RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxDRV", "DisplayName") <> "VirtualBox Service" Then
RunWait("cmd /c sc create VBoxDRV binpath= ""%CD%\" & $arch & "\drivers\VBoxDrv\VBoxDrv.sys"" type= kernel start= auto error= normal displayname= PortableVBoxDRV", @ScriptDir, @SW_HIDE)
If RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxSUP", "DisplayName") <> "VirtualBox Service" Then
RunWait("cmd /c sc create VBoxSUP binpath= ""%CD%\" & $arch & "\drivers\VBoxSup\VBoxSup.sys"" type= kernel start= auto error= normal displayname= PortableVBoxSUP", @ScriptDir, @SW_HIDE)
Local $DRV = 1
Else
Local $DRV = 0
Expand Down Expand Up @@ -707,7 +707,7 @@ If (FileExists(@ScriptDir & "\app32\virtualbox.exe") Or FileExists(@ScriptDir &
EndIf

If $DRV = 1 Then
RunWait("sc start VBoxDRV", @ScriptDir, @SW_HIDE)
RunWait("sc start VBoxSUP", @ScriptDir, @SW_HIDE)
EndIf

If $USB = 1 Then
Expand Down Expand Up @@ -779,7 +779,7 @@ If (FileExists(@ScriptDir & "\app32\virtualbox.exe") Or FileExists(@ScriptDir &
RunWait(@SystemDir & "\regsvr32.exe /S /U " & $arch & "\VBoxC.dll", @ScriptDir, @SW_HIDE)

If $DRV = 1 Then
RunWait("sc stop VBoxDRV", @ScriptDir, @SW_HIDE)
RunWait("sc stop VBoxSUP", @ScriptDir, @SW_HIDE)
EndIf

If $USB = 1 Then
Expand Down Expand Up @@ -843,7 +843,7 @@ If (FileExists(@ScriptDir & "\app32\virtualbox.exe") Or FileExists(@ScriptDir &
EndIf

If $DRV = 1 Then
RunWait("sc delete VBoxDRV", @ScriptDir, @SW_HIDE)
RunWait("sc delete VBoxSUP", @ScriptDir, @SW_HIDE)
EndIf

If $USB = 1 Then
Expand Down