Hi,
2013/6/4 Eric Christopherson <echr...@gmail.com>:
> I've run into a little more pain running my existing scripts using Ruby> 2.0.0 on Windows 7. This time, I'm trying to run a script that creates and> uses a WIN32OLE ScriptControl in order to run a VBscript script.>> It was working fine under 32-bit Windows XP and Ruby 1.9.3, but now when I> run the line>> sc = WIN32OLE.new( "ScriptControl" )>> I get:>> WIN32OLERuntimeError: failed to create WIN32OLE object from> `ScriptControl'>> Is there a new way to run VBscript in Ruby 2.0.0 and/or Windows 7? Is it> necessary to register components from the Windows side or something? If it> matters, this machine also has Visual Studio 2010, which my old one did not.
This is not Ruby 2.0.0 vs Ruby 1.9.3 issue, but 64 bit vs 32 bit issue.
The msscript component was not ported to 64 bit. It's a legacy
component and MS chose not to put the effort into migrating it to 64
bit.
If you want to use ScriptControl, you should use 32 bit Ruby
2.0.0(http://rubyforge.org/frs/download.php/76955/rubyinstaller-2.0.0-p195.exe)
Regards,
Park Heesob