how to detect x64 vs. x86?

Thierry Douez th.douez at gmail.com
Thu Sep 27 03:27:56 EDT 2012


Hi Phil,

Maybe enough to start with?

@echo off

ver | find “2003″ > nul
if %ERRORLEVEL% == 0 goto v2003

ver | find “XP” > nul
if %ERRORLEVEL% == 0 goto vxp

ver | find “2000″ > nul
if %ERRORLEVEL% == 0 goto v2000

ver | find “NT” > nul
if %ERRORLEVEL% == 0 goto vnt

echo Unknow OS Version.
goto exit

:v2003
:Run Windows 2003 specific commands here.
goto exit

:vxp
:Run Windows XP specific commands here.
goto exit

:v2000
:Run Windows 2000 specific commands here.
goto exit

:vnt
:Run Windows NT-specific commands here.
goto exit

:exit



HTH,

Thierry

2012/9/27 Phil Davis <revdev at pdslabs.net>:
> I know this has been discussed before, but my search reveals nothing. So I
> ask.
>
> On Windows, is there a variable / shell command / registry entry my app can
> look at to see whether the OS is 32- or 64-bit? It would be nice if you
> could do it the same way across Vista, 7, 8; but I'll settle for what
> exists.
>
> Thanks so much!
>
> --
> Phil Davis
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list