Possible values of %PROCESSOR_ARCHITECTURE%Batch File Check Directory exists in x64 and/or x86Will...

Output visual diagram of picture

What (if any) is the reason to buy in small local stores?

Strange behavior in TikZ draw command

A seasonal riddle

What is the period/term used describe Giuseppe Arcimboldo's style of painting?

Derivative of an interpolated function

How do you say "Trust your struggle." in French?

Put the phone down / Put down the phone

How do you justify more code being written by following clean code practices?

Reason why a kingside attack is not justified

Can you take a "free object interaction" while incapacitated?

Extract substring according to regexp with sed or grep

Why is indicated airspeed rather than ground speed used during the takeoff roll?

Should a narrator ever describe things based on a character's view instead of facts?

What properties make a magic weapon befit a Rogue more than a DEX-based Fighter?

Is there a distance limit for minecart tracks?

Reasons for having MCU pin-states default to pull-up/down out of reset

What is the tangent at a sharp point on a curve?

Why doesn't Gödel's incompleteness theorem apply to false statements?

Why is implicit conversion not ambiguous for non-primitive types?

How to test the sharpness of a knife?

Highest stage count that are used one right after the other?

Relations between homogeneous polynomials

Not hide and seek



Possible values of %PROCESSOR_ARCHITECTURE%


Batch File Check Directory exists in x64 and/or x86Will PROCESSOR_ARCHITECTURE Environment Variable Identify as 32 Bit on a 64 Bit Machine with a 32 Bit OS Installed?How can I program a script that can tell the difference between x86 & x64?Setting and getting Windows environment variables from the command prompt?cmd.exe SET command does not save values for new cmd.exe sessionsHow to write the path of a 32 bit executable in the Windows' Program Files folder regardless of the Windows version?TEMP vs TMP in Environment VariablesAssigning a Windows environment variable to a batch variable?How to use Powershell command invoke-sqlcmd in batch scriptWrong architecture or manufacturer - conflicting informationReading environment variable in command alias causes evaluating it?Don't refresh PATH user environment variable values in ConEmu without Windows rebootFind non-sequential counters in log













22















I'm writing a batch script for windows 7 and want to handle both 64 bit and and x86 processors.



What are the possible values of the Windows %PROCESSOR_ARCHITECTURE% environment variable?










share|improve this question















migrated from stackoverflow.com Jul 4 '11 at 1:44


This question came from our site for professional and enthusiast programmers.














  • 5





    'migrated from stackoverflow' ... it's as if someone doesn't think that batch scripting is proper programming!?

    – Rory
    Jun 23 '14 at 16:17
















22















I'm writing a batch script for windows 7 and want to handle both 64 bit and and x86 processors.



What are the possible values of the Windows %PROCESSOR_ARCHITECTURE% environment variable?










share|improve this question















migrated from stackoverflow.com Jul 4 '11 at 1:44


This question came from our site for professional and enthusiast programmers.














  • 5





    'migrated from stackoverflow' ... it's as if someone doesn't think that batch scripting is proper programming!?

    – Rory
    Jun 23 '14 at 16:17














22












22








22


4






I'm writing a batch script for windows 7 and want to handle both 64 bit and and x86 processors.



What are the possible values of the Windows %PROCESSOR_ARCHITECTURE% environment variable?










share|improve this question
















I'm writing a batch script for windows 7 and want to handle both 64 bit and and x86 processors.



What are the possible values of the Windows %PROCESSOR_ARCHITECTURE% environment variable?







windows command-line






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 4 '11 at 2:34









Jeff Atwood

17.5k2990114




17.5k2990114










asked Jul 4 '11 at 0:26







vcelloho











migrated from stackoverflow.com Jul 4 '11 at 1:44


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Jul 4 '11 at 1:44


This question came from our site for professional and enthusiast programmers.










  • 5





    'migrated from stackoverflow' ... it's as if someone doesn't think that batch scripting is proper programming!?

    – Rory
    Jun 23 '14 at 16:17














  • 5





    'migrated from stackoverflow' ... it's as if someone doesn't think that batch scripting is proper programming!?

    – Rory
    Jun 23 '14 at 16:17








5




5





'migrated from stackoverflow' ... it's as if someone doesn't think that batch scripting is proper programming!?

– Rory
Jun 23 '14 at 16:17





'migrated from stackoverflow' ... it's as if someone doesn't think that batch scripting is proper programming!?

– Rory
Jun 23 '14 at 16:17










4 Answers
4






active

oldest

votes


















25














http://msdn.microsoft.com/en-us/library/aa384274.aspx




  • AMD64

  • IA64

  • x86


Note that this doesn't tell you the architecture of the processor but only of the process with the environment variable. It returns "x86" for a 32 bit process running on 64 bit Windows.






share|improve this answer





















  • 8





    There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

    – Olegs Jeremejevs
    Jan 23 '14 at 11:35






  • 1





    Should add ARM in there now.

    – quadruplebucky
    Jul 16 '17 at 8:32



















3














"EM64T" is also a possible value, however unlikely.
My understanding is that you will only see this with XP-64.






share|improve this answer































    0














    type:
    "[IntPtr]::Size" -without quotes-



    if value is 4, youre in a 32-bit process, if 8, its 64-bit process





    share








    New contributor




    iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




























      -1














      REG QUERY "HKEY_LOCAL_MACHINEHARDWAREDESCRIPTIONSystemCentralProcessor" /v "Identifier" | Find "64 Family"
      IF %ERRORLEVEL% == 1 goto x86
      :x64
      REM Do 64 bit stuff here
      goto end
      :x86
      Do 32 bit stuff here
      :end
      EXIT %ERRORLEVEL%





      share|improve this answer


























      • I find querying the registry as fast and easy to code

        – Tim
        Feb 21 at 10:52











      • I should have REM'd the 'Do 32 bit stuff here'

        – Tim
        Feb 21 at 10:52






      • 1





        Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

        – music2myear
        Feb 21 at 16:52











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f305901%2fpossible-values-of-processor-architecture%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown
























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      25














      http://msdn.microsoft.com/en-us/library/aa384274.aspx




      • AMD64

      • IA64

      • x86


      Note that this doesn't tell you the architecture of the processor but only of the process with the environment variable. It returns "x86" for a 32 bit process running on 64 bit Windows.






      share|improve this answer





















      • 8





        There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

        – Olegs Jeremejevs
        Jan 23 '14 at 11:35






      • 1





        Should add ARM in there now.

        – quadruplebucky
        Jul 16 '17 at 8:32
















      25














      http://msdn.microsoft.com/en-us/library/aa384274.aspx




      • AMD64

      • IA64

      • x86


      Note that this doesn't tell you the architecture of the processor but only of the process with the environment variable. It returns "x86" for a 32 bit process running on 64 bit Windows.






      share|improve this answer





















      • 8





        There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

        – Olegs Jeremejevs
        Jan 23 '14 at 11:35






      • 1





        Should add ARM in there now.

        – quadruplebucky
        Jul 16 '17 at 8:32














      25












      25








      25







      http://msdn.microsoft.com/en-us/library/aa384274.aspx




      • AMD64

      • IA64

      • x86


      Note that this doesn't tell you the architecture of the processor but only of the process with the environment variable. It returns "x86" for a 32 bit process running on 64 bit Windows.






      share|improve this answer















      http://msdn.microsoft.com/en-us/library/aa384274.aspx




      • AMD64

      • IA64

      • x86


      Note that this doesn't tell you the architecture of the processor but only of the process with the environment variable. It returns "x86" for a 32 bit process running on 64 bit Windows.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Oct 7 '13 at 11:25









      Community

      1




      1










      answered Jul 4 '11 at 0:34









      RobertPittRobertPitt

      464717




      464717








      • 8





        There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

        – Olegs Jeremejevs
        Jan 23 '14 at 11:35






      • 1





        Should add ARM in there now.

        – quadruplebucky
        Jul 16 '17 at 8:32














      • 8





        There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

        – Olegs Jeremejevs
        Jan 23 '14 at 11:35






      • 1





        Should add ARM in there now.

        – quadruplebucky
        Jul 16 '17 at 8:32








      8




      8





      There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

      – Olegs Jeremejevs
      Jan 23 '14 at 11:35





      There's a workaround for the "32bit process on 64bit Windows" problem: just check PROCESSOR_ARCHITEW6432 as well, and if it isn't undefined (i.e. equals to AMD64 or IA64), then this is a 64bit machine. Source.

      – Olegs Jeremejevs
      Jan 23 '14 at 11:35




      1




      1





      Should add ARM in there now.

      – quadruplebucky
      Jul 16 '17 at 8:32





      Should add ARM in there now.

      – quadruplebucky
      Jul 16 '17 at 8:32













      3














      "EM64T" is also a possible value, however unlikely.
      My understanding is that you will only see this with XP-64.






      share|improve this answer




























        3














        "EM64T" is also a possible value, however unlikely.
        My understanding is that you will only see this with XP-64.






        share|improve this answer


























          3












          3








          3







          "EM64T" is also a possible value, however unlikely.
          My understanding is that you will only see this with XP-64.






          share|improve this answer













          "EM64T" is also a possible value, however unlikely.
          My understanding is that you will only see this with XP-64.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 24 '14 at 17:38









          DednDaveDednDave

          311




          311























              0














              type:
              "[IntPtr]::Size" -without quotes-



              if value is 4, youre in a 32-bit process, if 8, its 64-bit process





              share








              New contributor




              iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                type:
                "[IntPtr]::Size" -without quotes-



                if value is 4, youre in a 32-bit process, if 8, its 64-bit process





                share








                New contributor




                iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  type:
                  "[IntPtr]::Size" -without quotes-



                  if value is 4, youre in a 32-bit process, if 8, its 64-bit process





                  share








                  New contributor




                  iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  type:
                  "[IntPtr]::Size" -without quotes-



                  if value is 4, youre in a 32-bit process, if 8, its 64-bit process






                  share








                  New contributor




                  iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 1 min ago









                  iAn ARTiAn ART

                  1




                  1




                  New contributor




                  iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  iAn ART is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.























                      -1














                      REG QUERY "HKEY_LOCAL_MACHINEHARDWAREDESCRIPTIONSystemCentralProcessor" /v "Identifier" | Find "64 Family"
                      IF %ERRORLEVEL% == 1 goto x86
                      :x64
                      REM Do 64 bit stuff here
                      goto end
                      :x86
                      Do 32 bit stuff here
                      :end
                      EXIT %ERRORLEVEL%





                      share|improve this answer


























                      • I find querying the registry as fast and easy to code

                        – Tim
                        Feb 21 at 10:52











                      • I should have REM'd the 'Do 32 bit stuff here'

                        – Tim
                        Feb 21 at 10:52






                      • 1





                        Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

                        – music2myear
                        Feb 21 at 16:52
















                      -1














                      REG QUERY "HKEY_LOCAL_MACHINEHARDWAREDESCRIPTIONSystemCentralProcessor" /v "Identifier" | Find "64 Family"
                      IF %ERRORLEVEL% == 1 goto x86
                      :x64
                      REM Do 64 bit stuff here
                      goto end
                      :x86
                      Do 32 bit stuff here
                      :end
                      EXIT %ERRORLEVEL%





                      share|improve this answer


























                      • I find querying the registry as fast and easy to code

                        – Tim
                        Feb 21 at 10:52











                      • I should have REM'd the 'Do 32 bit stuff here'

                        – Tim
                        Feb 21 at 10:52






                      • 1





                        Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

                        – music2myear
                        Feb 21 at 16:52














                      -1












                      -1








                      -1







                      REG QUERY "HKEY_LOCAL_MACHINEHARDWAREDESCRIPTIONSystemCentralProcessor" /v "Identifier" | Find "64 Family"
                      IF %ERRORLEVEL% == 1 goto x86
                      :x64
                      REM Do 64 bit stuff here
                      goto end
                      :x86
                      Do 32 bit stuff here
                      :end
                      EXIT %ERRORLEVEL%





                      share|improve this answer















                      REG QUERY "HKEY_LOCAL_MACHINEHARDWAREDESCRIPTIONSystemCentralProcessor" /v "Identifier" | Find "64 Family"
                      IF %ERRORLEVEL% == 1 goto x86
                      :x64
                      REM Do 64 bit stuff here
                      goto end
                      :x86
                      Do 32 bit stuff here
                      :end
                      EXIT %ERRORLEVEL%






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 21 at 12:49









                      Mr Shunz

                      1,82512017




                      1,82512017










                      answered Feb 21 at 10:50









                      TimTim

                      1




                      1













                      • I find querying the registry as fast and easy to code

                        – Tim
                        Feb 21 at 10:52











                      • I should have REM'd the 'Do 32 bit stuff here'

                        – Tim
                        Feb 21 at 10:52






                      • 1





                        Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

                        – music2myear
                        Feb 21 at 16:52



















                      • I find querying the registry as fast and easy to code

                        – Tim
                        Feb 21 at 10:52











                      • I should have REM'd the 'Do 32 bit stuff here'

                        – Tim
                        Feb 21 at 10:52






                      • 1





                        Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

                        – music2myear
                        Feb 21 at 16:52

















                      I find querying the registry as fast and easy to code

                      – Tim
                      Feb 21 at 10:52





                      I find querying the registry as fast and easy to code

                      – Tim
                      Feb 21 at 10:52













                      I should have REM'd the 'Do 32 bit stuff here'

                      – Tim
                      Feb 21 at 10:52





                      I should have REM'd the 'Do 32 bit stuff here'

                      – Tim
                      Feb 21 at 10:52




                      1




                      1





                      Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

                      – music2myear
                      Feb 21 at 16:52





                      Tim, there's an EDIT button you can use to add and improve information in your answer. You should use this rather than adding comments. Your answer may be helpful, but right now it lacks any explanation of what you're doing and why this is a good way to go about finding the answer OP is looking for. As noted, use the EDIT button to make your answer better and more clear and complete.

                      – music2myear
                      Feb 21 at 16:52


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f305901%2fpossible-values-of-processor-architecture%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

                      Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                      VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...