We usually use this for tool deployment to artist machines as a super fail-safe method.
It would be awesome if we could use Python, but there’s some downsides to Python.
The correct python version needs to be installed on the target machine, and then it should be in the system path. If we want to query the x64 registry from python (e.g. to find out if Maya x64 is installed) then we actually need to launch the script from a x64 python installation. However some people have x86 python installed on x64 machines, or there are multiple Python installations on the machine… at this point things just get really complicated (at least more complicated than you want when just writing a simple tool deployment script!).
Compiling Python scripts with py2exe isn’t an option either since we still need separate x64 and x86 binaries. Also we rob ourselves of the ability to quickly change scripts on the go if needed.
I have to say we’re an outsourcer and the specs of our workstations vary WIDELY because some client’s tools require/only-work-with XP, Win7,x64,x86,etc. Some of our client’s tools have the bad habit of modifying the systems pretty heavily. So we always have to assume the worst when we deploy anything…
I haven’t tried powershell because we want something that ships with every windows version from XP up, but scripting host can be scripted in Visual Basic or Javascript. TAs pick up Javascript pretty quickly - even more so if they happened to work with Web apps or Unity before.
Right now we code the installation scripts in javascript. We copy files, query the registry, read .ini files, even create custom maya shelves all in javascript. Only UIs we do in Python because it’s easier for the TAs to code them there. Since the UI doesn’t do much it’s safe to just compile it with py2exe (so we don’t depend on an installed python interpreter) and call it from the javascript.
Finally the decision of what to use goes like this: we use scripting host where we would have used batch files in the past. We use scripting host if we cannot guarantee that python is installed on a machine. We use scripting host if we want the script to be x64 aware and capable of accessing win x64 specifics. Everything else -> python.