diff --git a/scripts/ps/controls.ps1 b/scripts/ps/controls.ps1 index 4b0d192..b852650 100644 --- a/scripts/ps/controls.ps1 +++ b/scripts/ps/controls.ps1 @@ -30,7 +30,7 @@ Function fSCControlIOSelection() { Read-Host "C" Write-Host "Now starting fast2kb.exe" Start-Process -FilePath "C:\sc\tools\fastio2kb\FastIO2KB_2021.04.04_Easter\Win64 TTX3\MAME Keymap\fast2kb.exe" -WorkingDirectory "C:\sc\tools\fastio2kb\FastIO2KB_2021.04.04_Easter\Win64 TTX3\MAME Keymap\" -Verb Open - $? = $vSCControlIOFastIO2KBExitCode + $vSCControlIOFastIO2KBExitCode = $? if ($vSCControlIOFastIO2KBExitCode -eq $true) { Write-Host "Application seems to be running OK" diff --git a/scripts/ps/display.ps1 b/scripts/ps/display.ps1 index 590f450..b13e173 100644 --- a/scripts/ps/display.ps1 +++ b/scripts/ps/display.ps1 @@ -16,7 +16,7 @@ Function fSCDisplayResolutionSelection() { elseif ($vSCDisplayResolutionSelectionResponse -eq 1) { ..\..\conf\cru\binaries\640-480.exe /i - $? = $vSCDisplayResolutionSelectionExitCode + $vSCDisplayResolutionSelectionExitCode = $? if ($vSCDisplayResolutionSelectionExitCode -neq $true) { Write-Host "SC-DSP-ERR002: CUSTOM RESOLUTION APPLICATION FAILED" @@ -37,7 +37,7 @@ Function fSCDisplayResolutionSelection() { elseif ($vSCDisplayResolutionSelectionResponse -eq 2) { ..\..\conf\cru\binaries\800-600.exe /i - $? = $vSCDisplayResolutionSelectionExitCode + $vSCDisplayResolutionSelectionExitCode = $? if ($vSCDisplayResolutionSelectionExitCode -neq $true) { Write-Host "SC-DSP-ERR003: CUSTOM RESOLUTION APPLICATION FAILED" @@ -58,7 +58,7 @@ Function fSCDisplayResolutionSelection() { elseif ($vSCDisplayResolutionSelectionResponse -eq 3) { ..\..\conf\cru\binaries\1360-768.exe /i - $? = $vSCDisplayResolutionSelectionExitCode + $vSCDisplayResolutionSelectionExitCode = $? if ($vSCDisplayResolutionSelectionExitCode -neq $true) { Write-Host "SC-DSP-ERR004: CUSTOM RESOLUTION APPLICATION FAILED" @@ -79,7 +79,7 @@ Function fSCDisplayResolutionSelection() { elseif ($vSCDisplayResolutionSelectionResponse -eq 4) { ..\..\conf\cru\binaries\1920-1080.exe /i - $? = $vSCDisplayResolutionSelectionExitCode + $vSCDisplayResolutionSelectionExitCode = $? if ($vSCDisplayResolutionSelectionExitCode -neq $true) { Write-Host "SC-DSP-ERR005: CUSTOM RESOLUTION APPLICATION EXITED WITH NON ZERO EXIT CODE" diff --git a/scripts/ps/syscheck.ps1 b/scripts/ps/syscheck.ps1 index 8c60242..8abecda 100644 --- a/scripts/ps/syscheck.ps1 +++ b/scripts/ps/syscheck.ps1 @@ -5,7 +5,7 @@ function fSCCountTotalMemory [Math]::Round ( ( Get-WmiObject -Class Win32_ComputerSystem -ComputerName localhost ) .TotalPhysicalMemory/1Mb ) $vSCTotalSystemMemoryMB = [Math]::Round ( ( Get-WmiObject -Class Win32_ComputerSystem -ComputerName localhost ) .TotalPhysicalMemory/1Mb ) if $vSCTotalSystemMemoryMB -lt 7000 - then + then { Write-Host "SC-SYS-ERR001: NOT ENOUGH SYSTEM MEMORY" Write-Host "This system does not have enough RAM to reliably run Sweetcade." @@ -50,7 +50,7 @@ function fSCOSVerification function fSCLicenseKeyCheck { Write-Host "---Check Windows OS License Key---" - Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" -ComputerName RemoteComp | where { $_.PartialProductKey } | select Description, LicenseStatus + Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" -ComputerName RemoteComp | Where-Object { $_.PartialProductKey } | Select-Object Description, LicenseStatus $vSCLicensedStatus = (Get-WmiObject -Class Win32_OperatingSystem).Caption if $vSCLicensedStatus -ne 1 then