Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
 )

...

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

...