Bugfix: Updating over current tools is working
This commit is contained in:
parent
3e63a50f92
commit
b689c33c96
1 changed files with 11 additions and 7 deletions
|
|
@ -270,8 +270,8 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||||
Remove-Item "$Root\WK\amd64\ConEmu\ConEmu.exe"
|
Remove-Item "$Root\WK\amd64\ConEmu\ConEmu.exe"
|
||||||
Remove-Item "$Root\WK\amd64\ConEmu\ConEmu.map"
|
Remove-Item "$Root\WK\amd64\ConEmu\ConEmu.map"
|
||||||
Move-Item "$Root\WK\amd64\ConEmu\ConEmu64.exe" "$Root\WK\amd64\ConEmu\ConEmu.exe"
|
Move-Item "$Root\WK\amd64\ConEmu\ConEmu64.exe" "$Root\WK\amd64\ConEmu\ConEmu.exe" -Force
|
||||||
Move-Item "$Root\WK\amd64\ConEmu\ConEmu64.map" "$Root\WK\amd64\ConEmu\ConEmu.map"
|
Move-Item "$Root\WK\amd64\ConEmu\ConEmu64.map" "$Root\WK\amd64\ConEmu\ConEmu.map" -Force
|
||||||
$ArgumentList = @(
|
$ArgumentList = @(
|
||||||
"x", "$Temp\ConEmuPack.7z", "-o$Root\WK\x86\ConEmu",
|
"x", "$Temp\ConEmuPack.7z", "-o$Root\WK\x86\ConEmu",
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0")
|
"-aoa", "-bso0", "-bse0", "-bsp0")
|
||||||
|
|
@ -334,8 +334,8 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0", "HWiNFO32.exe")
|
"-aoa", "-bso0", "-bse0", "-bsp0", "HWiNFO32.exe")
|
||||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||||
Remove-Item "$Temp\hwinfo*"
|
Remove-Item "$Temp\hwinfo*"
|
||||||
Move-Item "$Root\WK\amd64\HWiNFO\HWiNFO64.exe" "$Root\WK\amd64\HWiNFO\HWiNFO.exe"
|
Move-Item "$Root\WK\amd64\HWiNFO\HWiNFO64.exe" "$Root\WK\amd64\HWiNFO\HWiNFO.exe" -Force
|
||||||
Move-Item "$Root\WK\x86\HWiNFO\HWiNFO32.exe" "$Root\WK\x86\HWiNFO\HWiNFO.exe"
|
Move-Item "$Root\WK\x86\HWiNFO\HWiNFO32.exe" "$Root\WK\x86\HWiNFO\HWiNFO.exe" -Force
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
|
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
|
||||||
|
|
@ -353,8 +353,8 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0")
|
"-aoa", "-bso0", "-bse0", "-bsp0")
|
||||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||||
Remove-Item "$Temp\npp*"
|
Remove-Item "$Temp\npp*"
|
||||||
Move-Item "$Root\WK\amd64\NotepadPlusPlus\notepad++.exe" "$Root\WK\amd64\NotepadPlusPlus\notepadplusplus.exe"
|
Move-Item "$Root\WK\amd64\NotepadPlusPlus\notepad++.exe" "$Root\WK\amd64\NotepadPlusPlus\notepadplusplus.exe" -Force
|
||||||
Move-Item "$Root\WK\x86\NotepadPlusPlus\notepad++.exe" "$Root\WK\x86\NotepadPlusPlus\notepadplusplus.exe"
|
Move-Item "$Root\WK\x86\NotepadPlusPlus\notepad++.exe" "$Root\WK\x86\NotepadPlusPlus\notepadplusplus.exe" -Force
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
|
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
|
||||||
|
|
@ -368,7 +368,7 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0",
|
"-aoa", "-bso0", "-bse0", "-bsp0",
|
||||||
"ntpwedit64.exe", "*.txt")
|
"ntpwedit64.exe", "*.txt")
|
||||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||||
Move-Item "$Root\WK\amd64\NT Password Editor\ntpwedit64.exe" "$Root\WK\amd64\NT Password Editor\ntpwedit.exe"
|
Move-Item "$Root\WK\amd64\NT Password Editor\ntpwedit64.exe" "$Root\WK\amd64\NT Password Editor\ntpwedit.exe" -Force
|
||||||
$ArgumentList = @(
|
$ArgumentList = @(
|
||||||
"e", "$Temp\ntpwed.zip", ('-o"{0}\WK\x86\NT Password Editor"' -f $Root),
|
"e", "$Temp\ntpwed.zip", ('-o"{0}\WK\x86\NT Password Editor"' -f $Root),
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0",
|
"-aoa", "-bso0", "-bse0", "-bsp0",
|
||||||
|
|
@ -386,12 +386,16 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
$ArgumentList = @(
|
$ArgumentList = @(
|
||||||
"x", "$Temp\testdisk64.zip", "-o$Root\WK\amd64\TestDisk",
|
"x", "$Temp\testdisk64.zip", "-o$Root\WK\amd64\TestDisk",
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0")
|
"-aoa", "-bso0", "-bse0", "-bsp0")
|
||||||
|
# Remove destination since Move-Item -Force can't handle this recursive merge
|
||||||
|
Remove-Item "$Root\WK\amd64\TestDisk" -Recurse -Force
|
||||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||||
Move-Item "$Root\WK\amd64\TestDisk\testdisk-7.1-WIP\*" "$Root\WK\amd64\TestDisk" -Force
|
Move-Item "$Root\WK\amd64\TestDisk\testdisk-7.1-WIP\*" "$Root\WK\amd64\TestDisk" -Force
|
||||||
Remove-Item "$Root\WK\amd64\TestDisk\testdisk-7.1-WIP" -Recurse -Force
|
Remove-Item "$Root\WK\amd64\TestDisk\testdisk-7.1-WIP" -Recurse -Force
|
||||||
$ArgumentList = @(
|
$ArgumentList = @(
|
||||||
"x", "$Temp\testdisk32.zip", "-o$Root\WK\x86\TestDisk",
|
"x", "$Temp\testdisk32.zip", "-o$Root\WK\x86\TestDisk",
|
||||||
"-aoa", "-bso0", "-bse0", "-bsp0")
|
"-aoa", "-bso0", "-bse0", "-bsp0")
|
||||||
|
# Remove destination since Move-Item -Force can't handle this recursive merge
|
||||||
|
Remove-Item "$Root\WK\x86\TestDisk" -Recurse -Force
|
||||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||||
Move-Item "$Root\WK\x86\TestDisk\testdisk-7.1-WIP\*" "$Root\WK\x86\TestDisk" -Force
|
Move-Item "$Root\WK\x86\TestDisk\testdisk-7.1-WIP\*" "$Root\WK\x86\TestDisk" -Force
|
||||||
Remove-Item "$Root\WK\x86\TestDisk\testdisk-7.1-WIP" -Recurse -Force
|
Remove-Item "$Root\WK\x86\TestDisk\testdisk-7.1-WIP" -Recurse -Force
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue