[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Getting error when creating new instance of Wscript object

Anukul Singhal

3/21/2008 3:32:00 PM

Hi,

I performed the following:

require 'win32ole'

Now, when I create a new instance of Wscript shell object, I get the
following error in the output window:

wsh = WIN32OLE.new('Wscript.Shell')

invokingnotepadwsh.rb:4:in `initialize': failed to create WIN32OLE
object from `Wscript.Shell' (WIN32OLERuntimeError)
HRESULT error code:0x8007007e
The specified module could not be found. from
invokingnotepadwsh.rb:4:in `new'
from invokingnotepadwsh.rb:4
>Exit code: 1

Can anyone please help how to debug this? Is there anything wrong with
the code?

Thanks,
Anukul
--
Posted via http://www.ruby-....

2 Answers

David Mullet

3/22/2008 2:51:00 AM

0

Anukul Singhal wrote:
> Hi,
>
> I performed the following:
>
> require 'win32ole'
>
> Now, when I create a new instance of Wscript shell object, I get the
> following error in the output window:
>
> wsh = WIN32OLE.new('Wscript.Shell')
>
> invokingnotepadwsh.rb:4:in `initialize': failed to create WIN32OLE
> object from `Wscript.Shell' (WIN32OLERuntimeError)
> HRESULT error code:0x8007007e
> The specified module could not be found. from
> invokingnotepadwsh.rb:4:in `new'
> from invokingnotepadwsh.rb:4
>>Exit code: 1
>
> Can anyone please help how to debug this? Is there anything wrong with
> the code?
>
> Thanks,
> Anukul


This error may occur if your Windows Script installation is corrupted.
You might try reinstalling Windows Script from the Microsoft website.

David

http://rubyonwindows.bl...
--
Posted via http://www.ruby-....

Anukul Singhal

3/22/2008 6:38:00 AM

0

David Mullet wrote:
> Anukul Singhal wrote:
>> Hi,
>>
>> I performed the following:
>>
>> require 'win32ole'
>>
>> Now, when I create a new instance of Wscript shell object, I get the
>> following error in the output window:
>>
>> wsh = WIN32OLE.new('Wscript.Shell')
>>
>> invokingnotepadwsh.rb:4:in `initialize': failed to create WIN32OLE
>> object from `Wscript.Shell' (WIN32OLERuntimeError)
>> HRESULT error code:0x8007007e
>> The specified module could not be found. from
>> invokingnotepadwsh.rb:4:in `new'
>> from invokingnotepadwsh.rb:4
>>>Exit code: 1
>>
>> Can anyone please help how to debug this? Is there anything wrong with
>> the code?
>>
>> Thanks,
>> Anukul
>
>
> This error may occur if your Windows Script installation is corrupted.
> You might try reinstalling Windows Script from the Microsoft website.
>
> David
>
> http://rubyonwindows.bl...

The OS on my system is Windows Vista. I tried to get WSH5.7 for Windows
Vista but could not get one. Can you please help where I can download
the WSH which is compatible with Windows Vista?

Thanks,
Anukul

--
Posted via http://www.ruby-....