[SOLVED] Automatic running of 32 / 64bit version of TC

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
The_ERROR
Junior Member
Junior Member
Posts: 3
Joined: 2011-10-17, 12:56 UTC

[SOLVED] Automatic running of 32 / 64bit version of TC

Post by *The_ERROR »

Hi,

I just would like to know if is possible make "one starting point" of TC on USB stick so based on system it will run proper version of TC. In 32bit systems it run 32bit version and on 64bit it will run 64bit version. Is it possible to do this?

My only one solution which come to my mind just now is some cmd script, which run it properly:

Code: Select all

if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
	call TOTALCM64.exe
) else (
call TOTALCMD.EXE
)
pause
but...but... it is little complicated for some tools run cmd/bat

//Yes, seems, that if batch job is called from 32bit application, 32bit environment is chosen even if 64bit system is used. Most of portable apps like PortableApps or LiberKey are 32bit. :(
Last edited by The_ERROR on 2011-10-17, 14:10 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8713
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Try to test if %WINDIR%\SysWOW64 dir exists.
The_ERROR
Junior Member
Junior Member
Posts: 3
Joined: 2011-10-17, 12:56 UTC

Post by *The_ERROR »

Hey! Thanks for tip. I actually tried run cmd from 32bit app thet I will try take a look on system32 dir and there was one more variable:

Code: Select all

PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
so if I use this batch, it wokring fine...

Code: Select all

if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
if "%PROCESSOR_ARCHITEW6432%" == "AMD64" goto x64
if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86

:x64
	call TOTALCM64.exe
	goto EOF

:x86
	call TOTALCMD.EXE
:EOF
pause
The_ERROR
Junior Member
Junior Member
Posts: 3
Joined: 2011-10-17, 12:56 UTC

Post by *The_ERROR »

adjutments - close cmd after execute:

Code: Select all

if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
if "%PROCESSOR_ARCHITEW6432%" == "AMD64" goto x64
if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86

:x64
	start TOTALCMD64.exe
	goto EOF

:x86
	start TOTALCMD.EXE
:EOF
Post Reply