How to determine if system is 32 or 64 bit?

Apr 2, 2011
North Carolina, USA
I am about to upgrade from XP to Winhave looked at the help file and can't see if or how it's possible to determine if it's 32 or 64 bit. Would @Winapi[???] be the right call?
Aug 2, 2011
Berlin, Germany
Would %_X64 help you?
Apr 2, 2011
North Carolina, USA
Would %_X64 help you?

%_X64 doesn't appear in TCMD 8.x and I need to find out in a way that is backwords copatible to version 8.x. I did find:

_WOW64 returns 1 if the command processor is running in the WOW64 environment (64-bit Windows).

and I need to see if Windows is 32 or 6, not caring if it's the 32 or 64 bit version of TCMD that is running.
Aug 2, 2011
Berlin, Germany
Some time ago I needed some infos about the running windows without invoking tcmd/tcc :nailbiting: .
I made up a little autoit script which I compiled as console-application (checking "console?" in aut2exe).
I stuffed it with some autoit macros, e.g. "OSArch".
This is how it works:
(system)  C:\TEMP >autoitinfo $osa
(system)  C:\TEMP >autoitinfo Hello $b %username , $+ "you are currently working with a " $osa "-Windows".
Hello Frank,
you are currently working with a X64-Windows.
This is the source code:
; autoitinfo.au3
; fj 2011-05-25
dim $par, $parnum, $string
$parnum = $CmdLine[0]
for $i = 1 to $parnum
$par = $CmdLine[$i]
Switch $par
;;;;;;;;;;;;;;;;;;;;;;;;;;; special characters
Case "$tab"
                $string = $string & @TAB
Case "$B"
                $string = $string & " "
Case "$+"
                $string = $string & @CRLF
Case "$qm"
                $string = $string & '"'
;;;;;;;;;;;;;;;;;;;;;;;;;;; systeminfo
Case "$cpu"
                $string = $string & @CPUArch
Case "$ost"
                $string = $string & @OSType
Case "$osv"
                $string = $string & @OSVersion
Case "$osb"
                $string = $string & @OSBuild
Case "$osa"
                $string = $string & @OSArch
Case "$ossp"
                $string = $string & @OSServicePack
Case "$ip"
                $string = $string & @IPAddress1
Case "$user"
                $string = $string & @UserName
Case "$comspec"
                $string = $string & @Comspec
;;;;;;;;;;;;;;;;;;;;;;;;;;; date
case "$datetime"
                $string = $string & @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC
case "$date"
                $string = $string & @YEAR & @MON & @MDAY
case "$C"
                $string = $string & StringLeft( @YEAR, 2 )
case "$y"
                $string = $string & StringRight( @YEAR, 2 )
case "$m"
                $string = $string & @MON
case "$D"
                $string = $string & @MDAY
;;;;;;;;;;;;;;;;;;;;;;;;;;; Time
case "$time"
                $string = $string & @HOUR & @MIN & @SEC
case "$mi"
                $string = $string & @MIN
case "$h"
                $string = $string & @HOUR
case "$s"
                $string = $string & @SEC
case "$w"
                $string = $string & @WDAY
case "$z"
                $string = $string & @YDAY
;;;;;;;;;;;;;;;;;;;;;;;;;;; directories
Case "$cwd"
                $string = $string & @WorkingDir
case "$dw"
                $string = $string & @Windowsdir
case "$ds"
                $string = $string & @SystemDir
case "$dt"
                $string = $string & @TempDir
case "$dp"
                $string = $string & @ProgramFilesDir
case "$dc"
                $string = $string & @CommonFilesDir
case "$stmd"
                $string = $string & @StartMenuCommonDir
case "$ustmd"
                $string = $string & @StartMenuDir
case "$dtd"
                $string = $string & @DesktopCommonDir
case "$udtd"
                $string = $string & @DesktopDir
case "$docd"
                $string = $string & @DocumentsCommonDir
case "$udocd"
                $string = $string & @MyDocumentsDir
case Else
                $string = $string & $par
ConsoleWrite( $string & @CRLF )
Use it on your own risk.
Apr 2, 2011
North Carolina, USA
    Echo System has a 32-bit processor
  elseiff "%PROCESSOR_ARCHITECTURE%" EQ "x64" then
    echo System has a 64-bit processor
    echoerr System not known..... Get it serviced
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly How to? Determine size of file via download link Support 13
Joe Caverly Determine if program started from command prompt Support 2
Jay Sage How to Determine INI File Used by TCMD Support 6
C Determine process svchost is running Support 13
MickeyF how to determine which program will execute a file Support 10
M How to? How to determine if this is the first time that... Support 5
M How to? Determine a whether vars beginning with certain characters exist... Support 5
C old .vs. new system Support 0
Jay Sage Insufficient System Resources Support 1
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
M Problems with @REGBREAD on remote system Support 4
C "Failed to update the system registry. Please try using REGEDIT" Support 3
vefatica File system update after DEL? Support 4
vefatica @PID and system processes? Support 3
Patulus TCHistoryLog: TCC: (Sys) The system cannot find the path specified Support 15
J Documentation New help system: "skip word list" Support 11
vefatica New help system Support 14
H Fixed ... MSVCR120.dll is missing from your system ... Support 2
Daniel P How to Purchase a Multi-System License for TCC? Support 2
Emilio III 1 System license (literally?) Support 3
Steve Pitts Insufficient system resources exist to complete the requested service Support 1
A How to? Can't change directory ("cd") into system hidden files Support 13
R WAD issue with filename completion with system and hidden files Support 8
D Individual vs multi-system licenses Support 1
S Your system (homepage) blocks my IP! Support 4
M And oddity re the 32-bit TCC on a 64-bit system... Support 4
Phileosophos How to? The help system redirects to the index page Support 4
vefatica @PID, ISAPP - don't see system processes Support 12
L File association: System cannot find the associated program Support 30
gschizas View uses Windows-1252 codepage instead of System codepage Support 4
O CALL SYSTEM from Fortran Support 4
daniel347x How to get Take Command to read in all current system environment variables that CMD.EXE sees? Support 13
R Delete command sets directory attributes to hidden & system Support 46
S Need help to execute TCC commands on another system Support 6
fpefpe Registry as file system Support 20
D System Error: A required privilege is not held by the client. Support 4
J 4NT Error when running 'system' from a program to execute a .BTM Support 3
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
Joe Caverly VBEEP on 64-bit Support 3
vefatica SETP usually fails with a 32 bit process Support 4
rconn Dropping 32-bit support in Take Command & TCC? Support 14
T 32 and 64 bit simultaneous portable versions Support 2
vefatica Make FFIND a bit more friendly? Support 14
CWBillow Everything.exe - 64-bit? Support 8
S 32-bit Take Command v22 install for thumb drive Support 1
Per TCC/LE 14 64-bit won't start on Windows 10 Insider Preview 17063 (171213) Support 12
Joe Caverly SETP and 32-bit process Support 2
gworley How to? Take Command 20 64 bit vs 32 bit Support 1
mikea Documentation Consider expanding the docs for 'Everything' a bit Support 10
T 64 bit TCCLE appears to crash when opening tcc.exe from within tcc.exe window Support 7

Similar threads