mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-04-02 17:32:09 +00:00
Detect Windows 10 and show compatibility dialog
This commit is contained in:
parent
cacab0109e
commit
1b6de795c1
@ -91,6 +91,14 @@ public class PowerManagement {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Detect whether the image to process contains Windows 10 and show warning
|
||||||
|
if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) {
|
||||||
|
$msg = "Windows 10 has been detected in the image you want to process. While you can continue, Windows 10 is not a recommended target for MicroWin, and you may not get the full experience."
|
||||||
|
$dlg_msg = $msg
|
||||||
|
Write-Host $msg
|
||||||
|
[System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation)
|
||||||
|
}
|
||||||
|
|
||||||
$mountDirExists = Test-Path $mountDir
|
$mountDirExists = Test-Path $mountDir
|
||||||
$scratchDirExists = Test-Path $scratchDir
|
$scratchDirExists = Test-Path $scratchDir
|
||||||
if (-not $mountDirExists -or -not $scratchDirExists) {
|
if (-not $mountDirExists -or -not $scratchDirExists) {
|
||||||
|
Loading…
Reference in New Issue
Block a user