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,186 of 68,980    |
|    bisanfang@gmail.com to Gabor Grothendieck    |
|    Re: Is batch file called from 32 or 64 c    |
|    20 Apr 18 04:59:56    |
      On Monday, June 11, 2012 at 7:41:09 AM UTC+8, Gabor Grothendieck wrote:       > 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       ```              * Hold `Win+R` to open 32bit "%windir%\SysWOW64\cmd.exe", copy and paste the       above commandline or run *check_process_bits.bat*, it outputs:        proc32_on_win64*       * Hold `Win+R` to open 64bit "%windir%\System32\cmd.exe", copy and paste the       above commandline or run *check_process_bits.bat*, it outputs: *       roc64_on_win64 or proc32_on_win32*              Considering the 32-bit OS, we can use [batch file to check 64bit or 32bit       OS](https://stackoverflow.com/questions/12322308/batch-file-to-c       eck-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       > ```              --- 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