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.
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.