Page 1 of 1

error 0x800C000D instantiating component

Posted: Mon Feb 11, 2008 2:16 pm
by koolezt
Please bear with this scripting newbie, as I suspect I'm overlooking something childishly simple, but I can't get components to work.In Windows XP Professional SP2 with wsh 5.7, I've used the MS Windows Script Component Wizard to make a trivial file C:workdemo.wsc with 1 component having just 1 read-only property (default supplied). Then I make C:workdemo.vbs containing (at line 5):Set oTool = WScript.GetObject("script:C:workdemo.wsc")In a command window rooted at c:work, I runcscript demo.vbsand this is what I get:C:workdemo.vbs(5, 1) (null): 0x800C000Ddemo.vbs's line 4 is a WshShell.popup(), and that works. Line 6 is another .popup() and that does NOT run. demo.wsc registers and unregisters successfully. The result is the same whether or not it is registered, and javascript behaves the same way.I really have something(s) significant to script. This demo is only for diagnostic purposes.Any help would be much appreciated.

error 0x800C000D instantiating component

Posted: Mon Feb 11, 2008 2:16 pm
by koolezt
Please bear with this scripting newbie, as I suspect I'm overlooking something childishly simple, but I can't get components to work.In Windows XP Professional SP2 with wsh 5.7, I've used the MS Windows Script Component Wizard to make a trivial file C:workdemo.wsc with 1 component having just 1 read-only property (default supplied). Then I make C:workdemo.vbs containing (at line 5):Set oTool = WScript.GetObject("script:C:workdemo.wsc")In a command window rooted at c:work, I runcscript demo.vbsand this is what I get:C:workdemo.vbs(5, 1) (null): 0x800C000Ddemo.vbs's line 4 is a WshShell.popup(), and that works. Line 6 is another .popup() and that does NOT run. demo.wsc registers and unregisters successfully. The result is the same whether or not it is registered, and javascript behaves the same way.I really have something(s) significant to script. This demo is only for diagnostic purposes.Any help would be much appreciated.

error 0x800C000D instantiating component

Posted: Wed Feb 13, 2008 4:16 am
by donj
The way I usually see a WSC used (and you might try this to see if it works for you) is to right-click the WSC in Explorer to register it. You'll need to then use the ProgID defined in the WSC to instantiate it, using CreateObject() rather than GetObject().

error 0x800C000D instantiating component

Posted: Wed Feb 13, 2008 4:51 am
by jvierra
Don os more correct than I was. Sorry I missed the obvious. The Get will only work for an object that has already been loaded into memory. I don't think it will ever work with a WSC but I haven't tested that. The "Create" method is probaly what is needed as Don has pointed out.

error 0x800C000D instantiating component

Posted: Mon Feb 25, 2008 11:05 pm
by koolezt
Sorry about the delay, but I had password and login problems on this site.Thanks for the ideas, but I was waaay off-course. Noticing the resemblance to VBS classes and JS methods, I plunged in without my RFMs, and was doing so many things wrong, it's pathetic, but all is sorted now.Thanks again all.