Improve reWASD installation
This commit is contained in:
parent
15977d0a97
commit
6874aed162
1 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/pwsh
|
#!/bin/pwsh
|
||||||
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
||||||
|
. "$PSScriptRoot/../../Scripts/BrowserAutomation.ps1";
|
||||||
|
. "$PSScriptRoot/../../Scripts/SoftwarePackage.ps1";
|
||||||
|
|
||||||
$null = New-Module {
|
$null = New-Module {
|
||||||
$path = "$env:PUBLIC/Documents/reWASD";
|
$path = "$env:PUBLIC/Documents/reWASD";
|
||||||
|
@ -12,7 +14,15 @@ $null = New-Module {
|
||||||
|
|
||||||
function Restore-reWASD([Context] $context) {
|
function Restore-reWASD([Context] $context) {
|
||||||
Write-Host "Restoring reWASD";
|
Write-Host "Restoring reWASD";
|
||||||
Read-Host "Please hit enter once you have installed reWASD";
|
$tempDir = $context.GetTempDirectory();
|
||||||
|
|
||||||
|
Write-Information "Downloading reWASD";
|
||||||
|
$file = Start-AutomatedDownload $context "https://rewasd.com/" 'a[data-event-category="Download"]' $tempDir;
|
||||||
|
|
||||||
|
Write-Information "Installing reWASD";
|
||||||
|
Start-Process -Wait -FilePath $file.FullName -ArgumentList "/S";
|
||||||
|
|
||||||
|
Write-Information "Restoring files";
|
||||||
$context.Restore($context.SoftwareArchive($softwareName), $path);
|
$context.Restore($context.SoftwareArchive($softwareName), $path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue