diff --git a/scripts/ps/install.ps1 b/scripts/ps/install.ps1 index 9c12361..aff5f30 100644 --- a/scripts/ps/install.ps1 +++ b/scripts/ps/install.ps1 @@ -46,3 +46,11 @@ powercfg.exe /Change monitor-timeout-dc 0 powercfg.exe /Change standby-timeout-ac 0 powercfg.exe /Change standby-timeout-dc 0 +Write-Host "---Initial Copy Games to C:\sc\content\---" +#TODO + +Write-Host "---Install Unified Write Filter---" +Enable-WindowsOptionalFeature -Online -FeatureName "Client-UnifiedWriteFilter" -All + +Write-Host "---Enable Unified Write Filter---" +uwfmgr.exe Filter Enable diff --git a/scripts/ps/startuwf.ps1 b/scripts/ps/startuwf.ps1 index 503fa1d..5a90a55 100644 --- a/scripts/ps/startuwf.ps1 +++ b/scripts/ps/startuwf.ps1 @@ -1 +1,17 @@ -#TODO \ No newline at end of file +Write-Host "---Enable Unified Write Filter---" +uwfmgr.exe Filter Enable + +if ($? -ne $false) +{ + Write-Host "SC-UWF-ERR001: FAILED TO ENABLE UWF" + Write-Host "uwfmgr.exe exited with a non-zero error code" + Write-Host "Please review the output from when uwfmgr.exe ran and open a issue on the git repository at https://git.sdf.org/camoy/Sweetcade" + Write-Host "This script will now exit in 60 seconds" + Start-Sleep -Seconds 60 + Exit 1 +} +else +{ + #TODO - Prompt for a reboot? + Exit 0 +} \ No newline at end of file diff --git a/scripts/ps/stopuwf.ps1 b/scripts/ps/stopuwf.ps1 index 503fa1d..79699c7 100644 --- a/scripts/ps/stopuwf.ps1 +++ b/scripts/ps/stopuwf.ps1 @@ -1 +1,17 @@ -#TODO \ No newline at end of file +Write-Host "---Disable Unified Write Filter---" +uwfmgr.exe Filter Disable + +if ($? -ne $false) +{ + Write-Host "SC-UWF-ERR001: FAILED TO DISABLE UWF" + Write-Host "uwfmgr.exe exited with a non-zero error code" + Write-Host "Please review the output from when uwfmgr.exe ran and open a issue on the git repository at https://git.sdf.org/camoy/Sweetcade" + Write-Host "This script will now exit in 60 seconds" + Start-Sleep -Seconds 60 + Exit 1 +} +else +{ + #TODO - Prompt for a reboot? + Exit 0 +} \ No newline at end of file