viewpoint-particle

Author Topic: 32 vs 64 bit  (Read 61 times)

bettman

  • Newbie
  • *
  • Posts: 38
32 vs 64 bit
« on: November 27, 2019, 04:50:20 am »
Greetings,

Is it possible to have one script run as a 32 bit process on a 32 bit system and 64 on a 64 bit OS? I have a boilerplate script that I use to uninstall/install software. In some instances, the script (compiled as 32 bit) will not  run some of the steps properly. If I compile it as 64, it works properly.

td

  • Tech Support
  • *****
  • Posts: 3103
    • WinBatch
Re: 32 vs 64 bit
« Reply #1 on: November 27, 2019, 07:59:08 am »
It is generally not necessary to compiler both a 32-bit and a 64-bit version of a script.  In almost all cases the 32-bit version is sufficient.  The only time a 64-bit script is worth the effort is when
  • A targeted system does not have the 32-bit subsystem
  • Under certain rare conditions you need and can improve performance
  • You need very large binary buffers.

To answer your question directly, generally, scripts do not need any changes to work in both 32-bit and 64-bit environments. In certain cases, you need to make a few changes to get a script to work in both environments.  It is simply a matter of understanding file and registry redirection.  And if your script relies on any COM Automation objects, that you have both a 32-bit and 64-bit version of the COM Automation object available.   
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade