Skip to content

Commit 02d496b

Browse files
jrichter1dgolovin
authored andcommitted
Fix uninstall error when removing registry entry
1 parent bd6f985 commit 02d496b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

uninstaller/uninstall-helper.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#
2-
for ($i=0; $i -le $args.Count; $i++) {
2+
for ($i=0; $i -le $args.Count - 1; $i++) {
33
$folder += $args[$i] + " "
44
}
5+
$timeStamp = $args[-1]
56

67
$vboxInstalled = Test-Path $folder'\..\virtualbox'
78
$openjdkInstalled = Test-Path $folder'\..\jdk8'

uninstaller/uninstall.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
$timeStamp = $args[0]
12
$folder = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
23

34
Copy-Item $folder/uninstall-helper.ps1 $env:TEMP/uninstall-helper.ps1
45
cd ../..
56
# sign all shell scripts and replace ByPass to AllSigned
6-
Start-Process powershell.exe -Verb runAs -ArgumentList "-ExecutionPolicy ByPass -File `"$env:TEMP\uninstall-helper.ps1`" $folder"
7+
Start-Process powershell.exe -Verb runAs -ArgumentList "-ExecutionPolicy ByPass -File `"$env:TEMP\uninstall-helper.ps1`" $folder $timeStamp"

0 commit comments

Comments
 (0)