2024-08-08 02:36:35 +00:00
|
|
|
param(
|
|
|
|
$Action,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
2024-09-03 10:02:48 +00:00
|
|
|
& {
|
|
|
|
param($Parameters)
|
|
|
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
|
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-09-03 10:02:48 +00:00
|
|
|
$path = "$env:Public/Documents/reWASD";
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-09-03 10:02:48 +00:00
|
|
|
Start-SoftwareInstaller @Parameters `
|
|
|
|
-Backup {
|
2024-09-23 00:10:42 +00:00
|
|
|
param([string] $Name)
|
|
|
|
|
|
|
|
Add-BackupArtifacts -Path "$Name" -Source $path `
|
2024-09-03 10:02:48 +00:00
|
|
|
-Exclude @(
|
|
|
|
"Logs",
|
|
|
|
"Presets",
|
|
|
|
"Profiles/Desktop",
|
|
|
|
"Profiles/Duality",
|
2024-09-10 00:39:37 +00:00
|
|
|
"Profiles/Handheld",
|
2024-09-03 10:02:48 +00:00
|
|
|
"Profiles/Fortnite",
|
|
|
|
"Profiles/PS4 Remote*",
|
|
|
|
"Profiles/Switch console",
|
|
|
|
"Profiles/Switch to Xbox 360",
|
|
|
|
"Profiles/Valorant",
|
|
|
|
"Profiles/xCloud"
|
|
|
|
);
|
|
|
|
} `
|
|
|
|
-Installer {
|
|
|
|
Write-Host "Downloading reWASD…";
|
|
|
|
$dir = New-TemporaryDirectory;
|
|
|
|
$file = Start-BrowserDownload -URL "https://rewasd.com/" -ButtonSelector 'a.btn-default[href="#"]' -OutDir $dir -Timeout 1;
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-09-03 10:02:48 +00:00
|
|
|
Write-Host "Installing reWASD…";
|
|
|
|
Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S";
|
|
|
|
Remove-Item -Recurse $dir;
|
|
|
|
Remove-DesktopIcon "*reWASD*";
|
|
|
|
} `
|
|
|
|
-Configurator {
|
2024-09-23 00:10:42 +00:00
|
|
|
param([string] $Name)
|
|
|
|
Expand-BackupArtifacts -Path "$Name" -Target $path;
|
2024-09-03 10:02:48 +00:00
|
|
|
};
|
|
|
|
} $PSBoundParameters;
|