Improve ImageState detection
This commit is contained in:
parent
2e6bfa94c2
commit
b8504cc21e
|
@ -1458,9 +1458,9 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
||||||
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
||||||
set error=1
|
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
|
||||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
|
||||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||||
|
set error=1
|
||||||
set showfix=1
|
set showfix=1
|
||||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||||
)
|
)
|
||||||
|
|
|
@ -1221,9 +1221,9 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
||||||
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
||||||
set error=1
|
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
|
||||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
|
||||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||||
|
set error=1
|
||||||
set showfix=1
|
set showfix=1
|
||||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||||
)
|
)
|
||||||
|
|
|
@ -1375,9 +1375,9 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
||||||
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
||||||
set error=1
|
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
|
||||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
|
||||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||||
|
set error=1
|
||||||
set showfix=1
|
set showfix=1
|
||||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||||
)
|
)
|
||||||
|
|
|
@ -1681,9 +1681,9 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
||||||
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
||||||
set error=1
|
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
|
||||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
|
||||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||||
|
set error=1
|
||||||
set showfix=1
|
set showfix=1
|
||||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||||
)
|
)
|
||||||
|
|
|
@ -2730,9 +2730,9 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
|
||||||
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
if /i not "%imagestate%"=="IMAGE_STATE_COMPLETE" (
|
||||||
set error=1
|
call :dk_color %Gray% "Checking Windows Setup State [%imagestate%]"
|
||||||
call :dk_color %Red% "Checking Windows Setup State [%imagestate%]"
|
|
||||||
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
echo "%imagestate%" | find /i "RESEAL" %nul% && (
|
||||||
|
set error=1
|
||||||
set showfix=1
|
set showfix=1
|
||||||
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
call :dk_color %Blue% "You need to run it in normal mode in case you are running it in Audit Mode."
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue