A
Alek Davis
Hi,
Is it possible to access intrinsic WScript object properties from a .NET
class? I am writing a COM object in .NET (VB.NET or C#), which can be
invoked from a WSH script (VBS, JS, etc). In the COM object logic, I have to
detect such properties as Interactive, ScriptFullName, and others. I can get
some of these properties through the .NET Framework equivalents, but some
properties are only available from WScript object. I thought that I could
get them through the IHost interface of the WScript.exe (I added it as a
reference), but I cannot figure out how to instantiate the IHost object. I
tried to create as:
IHost.IHost iHost = new IHost.IHost_ClassClass();
but got the error:
"COM object with CLSID {60254CA2-953B-11CF-8C96-00AA00B8708C} is either not
valid or not registered."
Any ideas? Thanks,
Alek
P.S. Sorry for cross-posting. I tried the Interop group but did not get any
responses.
Is it possible to access intrinsic WScript object properties from a .NET
class? I am writing a COM object in .NET (VB.NET or C#), which can be
invoked from a WSH script (VBS, JS, etc). In the COM object logic, I have to
detect such properties as Interactive, ScriptFullName, and others. I can get
some of these properties through the .NET Framework equivalents, but some
properties are only available from WScript object. I thought that I could
get them through the IHost interface of the WScript.exe (I added it as a
reference), but I cannot figure out how to instantiate the IHost object. I
tried to create as:
IHost.IHost iHost = new IHost.IHost_ClassClass();
but got the error:
"COM object with CLSID {60254CA2-953B-11CF-8C96-00AA00B8708C} is either not
valid or not registered."
Any ideas? Thanks,
Alek
P.S. Sorry for cross-posting. I tried the Interop group but did not get any
responses.