|
13 | 13 | "script": [ |
14 | 14 | "if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }", |
15 | 15 | "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'", |
18 | 17 | "Start-Process msiexec -ArgumentList @('/i', \"`\"$dir\\setup.msi`\"\", '/qn', '/norestart', \"INSTALLDIR=`\"$dir`\"\") -Wait -Verb RunAs | Out-Null", |
19 | 18 | "Start-Process icacls -ArgumentList @(\"`\"$dir`\"\", '/grant', 'Everyone:F', '/T') -Wait -Verb RunAs | Out-Null", |
20 | 19 | "Remove-Item \"$dir\\setup.exe\", \"$dir\\setup.msi\"", |
|
25 | 24 | "script": [ |
26 | 25 | "if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }", |
27 | 26 | "$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 | + "}" |
31 | 31 | ] |
32 | 32 | }, |
33 | 33 | "bin": [ |
|
39 | 39 | "VBoxManage.exe", |
40 | 40 | "VBoxNetDHCP.exe", |
41 | 41 | "VBoxNetNAT.exe", |
42 | | - "VBoxSDS.exe", |
43 | | - "VBoxSVC.exe", |
44 | 42 | "VBoxWebSrv.exe", |
45 | 43 | "VirtualBox.exe", |
46 | 44 | "VirtualBoxVM.exe" |
|
0 commit comments