Table of Contents |
---|
...
http://steve-jansen.github.io/guides/windows-batch-scripting/index.html
If Statement Examples:
No Format |
---|
If Exist C:\Windows\SysWOW64 (
do some stuff for 64-bit Windows
do maybe another line of stuff
) ELSE (
do some other stuff for 32-bit Windows
and maybe another line of stuff
) |
No Format |
---|
If Exist C:\Windows\SysWOW64 (
GOTO x64
) ELSE (
GOTO x86
)
:x64
do some stuff
GOTO END
:x86
do some stuff
GOTO END
:END
|
Converting to gpt
CMD:
Diskpart
...
Initialize-Disk -Number 0 -PartitionStyle GPT
Getting System Info
Detecting Windows Version
CMD:
ver | find "6.3" >nul && goto WIN8
...
Get-WindowsEdition -Verbose -Online
Detecting Hardware Model
if /i "%WMICModel:~0,7%"=="20074DU" set TP=y
...