A 32 bit script, checking on which OS running, and calling some different funcs, should also do the job.