Can I check to see if current machine is running 64bit OS or 32bit OS inside a batch file?
EDIT:
Found this online and it is good enough to me now:
Can I check to see if current machine is running 64bit OS or 32bit OS inside a batch file?
EDIT:
Found this online and it is good enough to me now:
Based on: https://blogs.msdn.microsoft.com/david.wang/2006/03/27/howto-detect-process-bitness/
and http://ss64.com/nt/syntax-64bit.html
I use either of the following:
or I set the
bit
variable, which I later use in my script to run the correct setup.or...
Hope this helps.
Here's my personal favorite, a logical bomb :)
With the AND's (
&&
) and OR's (||
) this is aIF THEN ELSE
Batch Construct.If the script be able to running under Administrator, then it can use the wmi command.