Add a backup script for reWASD
This commit is contained in:
parent
e54a92dc52
commit
2cf84dc44c
1 changed files with 36 additions and 14 deletions
|
@ -3,11 +3,31 @@ param(
|
||||||
[hashtable] $Arguments
|
[hashtable] $Arguments
|
||||||
)
|
)
|
||||||
|
|
||||||
|
& {
|
||||||
|
param($Parameters)
|
||||||
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
||||||
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
|
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
|
||||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||||
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
$path = "$env:Public/Documents/reWASD";
|
||||||
|
|
||||||
|
Start-SoftwareInstaller @Parameters `
|
||||||
|
-Backup {
|
||||||
|
Add-BackupArtifacts -Path "reWASD" -Source $path `
|
||||||
|
-Exclude @(
|
||||||
|
"Logs",
|
||||||
|
"Presets",
|
||||||
|
"Profiles/Desktop",
|
||||||
|
"Profiles/Duality",
|
||||||
|
"Profiles/Fortnite",
|
||||||
|
"Profiles/PS4 Remote*",
|
||||||
|
"Profiles/Switch console",
|
||||||
|
"Profiles/Switch to Xbox 360",
|
||||||
|
"Profiles/Valorant",
|
||||||
|
"Profiles/xCloud"
|
||||||
|
);
|
||||||
|
} `
|
||||||
-Installer {
|
-Installer {
|
||||||
Write-Host "Downloading reWASD…";
|
Write-Host "Downloading reWASD…";
|
||||||
$dir = New-TemporaryDirectory;
|
$dir = New-TemporaryDirectory;
|
||||||
|
@ -17,6 +37,8 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S";
|
Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S";
|
||||||
Remove-Item -Recurse $dir;
|
Remove-Item -Recurse $dir;
|
||||||
Remove-DesktopIcon "*reWASD*";
|
Remove-DesktopIcon "*reWASD*";
|
||||||
|
} `
|
||||||
|
-Configurator {
|
||||||
|
Expand-BackupArtifacts -Path "reWASD" -Target $path;
|
||||||
};
|
};
|
||||||
|
} $PSBoundParameters;
|
||||||
# ToDo: Add restoration
|
|
||||||
|
|
Loading…
Reference in a new issue