Skip to content

Commit 830ea25

Browse files
authored
Update virtualbox.json
1 parent 28219ab commit 830ea25

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bucket/virtualbox.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"script": [
1414
"if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
1515
"Invoke-ExternalCommand \"$dir\\setup.exe\" -ArgumentList @('--extract', '-path', \"$dir\", '--silent') | Out-Null",
16-
"Get-ChildItem \"$dir\\VirtualBox*amd64.msi\" | Rename-Item -NewName 'setup.msi'",
17-
"Get-ChildItem \"$dir\\VirtualBox*arm64.msi\" | Remove-Item",
16+
"Get-ChildItem \"$dir\\VirtualBox*r*.msi\" | Rename-Item -NewName 'setup.msi'",
1817
"Start-Process msiexec -ArgumentList @('/i', \"`\"$dir\\setup.msi`\"\", '/qn', '/norestart', \"INSTALLDIR=`\"$dir`\"\") -Wait -Verb RunAs | Out-Null",
1918
"Start-Process icacls -ArgumentList @(\"`\"$dir`\"\", '/grant', 'Everyone:F', '/T') -Wait -Verb RunAs | Out-Null",
2019
"Remove-Item \"$dir\\setup.exe\", \"$dir\\setup.msi\"",
@@ -25,9 +24,10 @@
2524
"script": [
2625
"if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
2726
"$id_array = wmic product where \"name like 'Oracle VirtualBox%'\" get IdentifyingNumber",
28-
"if (!($id_array[2] -match '({[0-9A-F-]+})')) { error 'Could not find product ID'; break }",
29-
"$id = $matches[1]",
30-
"Invoke-ExternalCommand msiexec -ArgumentList @('/x', \"$id\", '/qn', '/norestart') -RunAs | Out-Null"
27+
"if ($id_array[2] -match '({[0-9A-F-]+})') {",
28+
" $id = $matches[1]",
29+
" Invoke-ExternalCommand msiexec -ArgumentList @('/x', \"$id\", '/qn', '/norestart') -RunAs | Out-Null",
30+
"}"
3131
]
3232
},
3333
"bin": [
@@ -39,8 +39,6 @@
3939
"VBoxManage.exe",
4040
"VBoxNetDHCP.exe",
4141
"VBoxNetNAT.exe",
42-
"VBoxSDS.exe",
43-
"VBoxSVC.exe",
4442
"VBoxWebSrv.exe",
4543
"VirtualBox.exe",
4644
"VirtualBoxVM.exe"

0 commit comments

Comments
 (0)