From 81165abc8dad5bba8cd5a5ca981014c6ef836a8f Mon Sep 17 00:00:00 2001 From: camoy Date: Thu, 15 Aug 2024 16:59:24 -0700 Subject: [PATCH] Comparator correction and update uninstall message --- scripts/ps/makedirs.ps1 | 4 ++-- scripts/ps/makerespt.ps1 | 2 +- scripts/ps/sweetcade.ps1 | 2 +- scripts/ps/syscheck.ps1 | 2 +- scripts/ps/uninstall.ps1 | 5 ++--- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/ps/makedirs.ps1 b/scripts/ps/makedirs.ps1 index bc9553d..9534289 100644 --- a/scripts/ps/makedirs.ps1 +++ b/scripts/ps/makedirs.ps1 @@ -1,6 +1,6 @@ Write-Host "---Create Directories---" New-Item -Path "C:\sc" -Name "tools" -ItemType "Directory" - if ( ?$ -neq True ) + if ( ?$ -ne True ) { Write-Host "SC-DIR-ERR001: CANNOT CREATE NEEDED DIRECTORIES" Write-Host "Creating the following directories has failed." @@ -10,7 +10,7 @@ New-Item -Path "C:\sc" -Name "tools" -ItemType "Directory" Exit 1 } New-Item -Path "C:\sc" -Name "content" -ItemType "Directory" - if ( ?$ -neq True ) + if ( ?$ -ne True ) { Write-Host "SC-DIR-ERR001: CANNOT CREATE NEEDED DIRECTORIES" Write-Host "Creating the following directories has failed." diff --git a/scripts/ps/makerespt.ps1 b/scripts/ps/makerespt.ps1 index 9e6ecae..88d13a1 100644 --- a/scripts/ps/makerespt.ps1 +++ b/scripts/ps/makerespt.ps1 @@ -1,6 +1,6 @@ Write-Host "---Create restore point for C:\---" Checkpoint-Computer -Description "Before Sweetcade Install" -RestorePointType APPLICATION_INSTALL -if ( $? -neq True ) +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." diff --git a/scripts/ps/sweetcade.ps1 b/scripts/ps/sweetcade.ps1 index b9a3a71..05a5c70 100644 --- a/scripts/ps/sweetcade.ps1 +++ b/scripts/ps/sweetcade.ps1 @@ -13,7 +13,7 @@ Write-Host "---Retrieving Software License File---" Invoke-WebRequest "https://git.sdf.org/camoy/Sweetcade/raw/branch/main/license.txt" -OutFile .\license.txt Write-Host "---Displaying Software License File---" Get-Content -Path .\license.txt | Out-Host -Paging - if ($? -neq 0) + if ($? -ne 0) { Write-Host "----------" Write-Host "You must read and accept the terms of the software license to install Sweetcade." diff --git a/scripts/ps/syscheck.ps1 b/scripts/ps/syscheck.ps1 index fbe7c30..8c60242 100644 --- a/scripts/ps/syscheck.ps1 +++ b/scripts/ps/syscheck.ps1 @@ -52,7 +52,7 @@ function fSCLicenseKeyCheck Write-Host "---Check Windows OS License Key---" Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" -ComputerName RemoteComp | where { $_.PartialProductKey } | select Description, LicenseStatus $vSCLicensedStatus = (Get-WmiObject -Class Win32_OperatingSystem).Caption - if $vSCLicensedStatus -neq 1 + if $vSCLicensedStatus -ne 1 then { Write-Host "SC-SYS-ERR003: WINDOWS NOT PERMANENTLY ACTIVATED" diff --git a/scripts/ps/uninstall.ps1 b/scripts/ps/uninstall.ps1 index 2732610..b2c4132 100644 --- a/scripts/ps/uninstall.ps1 +++ b/scripts/ps/uninstall.ps1 @@ -1,7 +1,6 @@ Write-Host "---Uninstall Sweetcade---" -Write-Host "This script will uninstall Sweetcade. It will remove any relevant shortcuts for automatic startup and delete the C:\sctools folder." -Write-Host "Any configuration or files you have inside this directory will be PERMANENTLY DELETED." -Write-Host "D:\sccontent will not be modified." +Write-Host "This script will uninstall Sweetcade. It will remove any relevant shortcuts for automatic startup and delete the C:\sc folder." +Write-Host "Any configuration, files or GAME DATA you have inside this directory will be PERMANENTLY DELETED." Write-Host "To [U]ninstall, connect a keyboard and type U." Write-Host "To [A]bort, connect a keyboard and type A." vSCLicensedStatusUserResponse = Read-Host "U / A?"