%ProgramFiles% = ENV['ProgramFiles']
TBD wrote:as I dont have 64bit Windows to test it up, take in account this as well - "The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit"
But I told him to use %ProgramFiles(x86)%
(which is ENV['ProgramFiles(x86)']
,) and should not be present on 32bit systems.
On a 64bit system, running a 32bit process (in this case 32bit Sketchup, running 32bit Ruby as a subprocess,) a copy of the enviroment is created for the process. Both the vars ENV['ProgramFiles']
should contain a pathstring that points at the same 32bit localized "program files" directory.