' WIM (Windows Image Manager) Tools
' (c) 2021 by Hannes Sehestedt
' Release notes can be found at the very end of the program
' This program is intended to be run on Windows 10 x64 and should be compiled with the 64-bit version of QB64.
' The program is currently tested and compiled on QB64 version 1.5, May 22, 2021 Development Build.
' IMPORTANT: It is very important to use the March 17, 2021 Dev Build or newer as this fixes a bug with the
' CLEAR command.
' This program needs to be run elevated. Check to see if the program is running elevated, if not,
' restart in elevated mode and terminate current non-elevated program.
If (_ShellHide(">nul 2>&1 " + Chr$(34) + "%SYSTEMROOT%\system32\cacls.exe" + Chr$(34) + " " + Chr$(34) + "%SYSTEMROOT%\system32\config\system" + Chr$(34))) <> 0 Then
' If we reach this point then the program was run elevated.
' ********************************************************
' ** Make sure to keep the "$VersionInfo" updated below **
' ********************************************************
' Perform some initial setup for the program
BeginProgram:
Print "Initializing program. Standby..."