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,198 of 68,980    |
|    npocmaka to bisa...@gmail.com    |
|    Re: Is batch file called from 32 or 64 c    |
|    23 Apr 18 08:07:47    |
      From: npocmaka@gmail.com              On Friday, April 20, 2018 at 12:59:58 PM UTC+1, bisa...@gmail.com wrote:       > 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       > > ```              to check if it is the C:\Windows\SysWOW64\cmd.exe you can check the       %__APPDIR__% environment variable.              --- 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