Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,189 of 68,980    |
|    Auric__ to bisanfang    |
|    Re: Is batch file called from 32 or 64 c    |
|    20 Apr 18 17:36:07    |
      From: not.my.real@email.address              bisanfang wrote:              > On Monday, June 11, 2012 at 7:41:09 AM UTC+8, Gabor Grothendieck wrote:        ^^^^^^^^^^^^^              ***SIX YEARS AGO.***              >> Is there some way of finding out in a batch file if it was invoked from       >> a 32 bit or 64 bit cmd.exe ? My preference is to be able to do this       >> without using external utilities, if possible. Thanks.       >       > I use the following command on my 64bit version of windows 10 (havn't       > tested on 32bit operating system), *check_process_bits.bat*:       >       > ```bat       > IF EXIST "%windir%\Sysnative\cmd.exe" (ECHO proc32_on_win64) ELSE ECHO       > proc64_on_win64 or proc32_on_win32 ```       [snip]              My Win10x86 install does *not* have that directory, nor does my Win7x64       system.              > Considering the 32-bit OS, we can use [batch file to check 64bit or       > 32bit OS]       > (https://stackoverflow.com/questions/12322308/batch-file-to-check-64bit-       > or-32bit-os#24590583)       >> ```bat       >> @echo OFF       >>       >> reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find       >> /i "x86" > NUL && set OS=32BIT || set OS=64BIT       >>       >> if %OS%==32BIT echo This is a 32bit operating system       >> if %OS%==64BIT echo This is a 64bit operating system       >> ```              The only problem I see is the (rare?) case where Windows is running on non-       Intel architectures. For example, Windows 10 has an ARM edition; how would       you deal with that?              --       The approval of the dead is meaningless.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca