The MASM Forum

Projects => Poasm => Topic started by: Vortex on May 08, 2016, 07:38:49 PM

Title: Windows Preinstallation Environment detection
Post by: Vortex on May 08, 2016, 07:38:49 PM
IsWinPE is a tiny tool to detect if the user is operating under Windows PE ( Preinstallation Environmet ) or Windows. The environment variable ERRORLEVEL is set to 1 if WinPE is detected. Otherwise, ERRORLEVEL is set to 0

test.bat :

Code: [Select]
IsWinPE.exe

@IF %ERRORLEVEL% == 1 ( @echo Operating in WinPE environment

                      ) ELSE (
                              @echo Operating in Windows environment
                             )
Title: Re: Windows Preinstallation Environment detection
Post by: Vortex on April 09, 2017, 11:46:21 PM
Here is the 64-bit version.