Files
Sweetcade/scripts/ps/makerespt.ps1
2024-12-28 19:53:58 -08:00

21 lines
1.1 KiB
PowerShell

Write-Host "---Create restore point for C:\---"
Checkpoint-Computer -Description "Before Sweetcade Install" -RestorePointType APPLICATION_INSTALL
if ( $? -ne $true )
{
Write-Host "SC-RPT-ERR001: CANNOT CREATE RESTORE POINT"
Write-Host "Creating a restore point has failed. The reason for failure should be printed above."
Write-Host "You may continue to install Sweetcade but will have to use the uninstall script instead should you wish to remove Sweetcade."
Write-Host "If you would like to [C]ontinue, connect a keyboard and type C."
Write-Host "If you would like to [S]top the install to investigate further, connect a keyboard and type S."
vSCRestorePointUserResponse = Read-Host "C / S?"
if ($vSCNextHopUserResponse -contains "C")
{
Exit 1
}
else
{
Write-Host "This script will now exit after 60 seconds."
Start-Sleep -Seconds 60
}
}