File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -2121,6 +2121,12 @@ function Start-ProjectDevelopment {
21212121
21222122$host.UI.RawUI.WindowTitle = " DISMTools - Preinstallation Environment Helper"
21232123
2124+ if ([Environment ]::OSVersion.Platform -ne " Win32NT" ) {
2125+ Write-Host " This script cannot be run on non-Windows NT platforms. Press ENTER to exit..."
2126+ Read-Host | Out-Null
2127+ exit 1
2128+ }
2129+
21242130if ($cmd -eq " StartApply" )
21252131{
21262132 Start-OSApplication
Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ Write-Host "(c) 2025. CodingWonders Software"
132132Write-Host " -----------------------------------------------------------"
133133
134134Write-LogMessage - message " Checking operating environment..."
135+
136+ if ([Environment ]::OSVersion.Platform -ne " Win32NT" ) {
137+ Write-Host " This script cannot be run on non-Windows NT platforms. Press ENTER to exit..."
138+ Read-Host | Out-Null
139+ return $false
140+ }
141+
135142$compInfo = Get-ComputerInfo
136143if ($compInfo.WindowsInstallationType -ne " Server" ) {
137144 Write-LogMessage - message " This computer is not running Windows Server."
Original file line number Diff line number Diff line change @@ -628,6 +628,12 @@ function New-MulticastTransmission {
628628
629629Clear-Host
630630
631+ if ([Environment ]::OSVersion.Platform -ne " Win32NT" ) {
632+ Write-Host " This script cannot be run on non-Windows NT platforms. Press ENTER to exit..."
633+ Read-Host | Out-Null
634+ return $false
635+ }
636+
631637Write-Host " DISMTools $version - PE Helper WDS Preparation Scripts"
632638Write-Host " (c) 2025. CodingWonders Software"
633639Write-Host " -----------------------------------------------------------"
Original file line number Diff line number Diff line change @@ -93,6 +93,13 @@ Write-Host "(c) 2025. CodingWonders Software"
9393Write-Host " -----------------------------------------------------------"
9494
9595Write-LogMessage - message " Checking operating environment..."
96+
97+ if ([Environment ]::OSVersion.Platform -ne " Win32NT" ) {
98+ Write-Host " This script cannot be run on non-Windows NT platforms. Press ENTER to exit..."
99+ Read-Host | Out-Null
100+ return $false
101+ }
102+
96103$compInfo = Get-ComputerInfo
97104if ($compInfo.WindowsInstallationType -ne " Server" ) {
98105 Write-LogMessage - message " This computer is not running Windows Server."
You can’t perform that action at this time.
0 commit comments