You could expose .NET objects so that they are usable from VBScript.
You could also just compile the code and run the script (the compiler is
part of the Framework).
What are you trying to do ?

Signature
Patrice
> Can I use .Net Framework 2.0 objects with Windows Script Host 5.6? I haven't
> found this information anywhere. I know that you have to use VS2005 to be
> able to use .Net 2.0 so my guess is no!
>
> Ornulf Schomer
> Norway
Ornulf Schomer - 02 Mar 2006 12:03 GMT
I am planning to write a script that traverses our data server disks and
checks if there is any users og domain global groups in the ACEs. Our
standard is to give access rights to folders and shares via Domain Local
groups, but I know that there has been a lot of errors made. And to script
this would be preferable to right-clicking every folder and make a note of
the ACEs . :-)
Originally I thought I'd write an commandline-app that did this but as I
have visual studio 2003 only - I cannot access the
System.Security.AccessControl-namespace.
So my question then is wether Visual Basic Scriping Edition in any way can
use these objects, when VS2003 can't?
Ornulf
> You could expose .NET objects so that they are usable from VBScript.
> You could also just compile the code and run the script (the compiler is
[quoted text clipped - 9 lines]
>> Ornulf Schomer
>> Norway
Hi,
Yes you can, however it requires some work. You should create a class
library project and make appropriate classes COM visible. The details are
well described in MSDN, look for the
"Exposing .NET Framework Components to COM"
section. You will need to make sure you use dual interfaces and OLE
automation-compatible data types.
> Can I use .Net Framework 2.0 objects with Windows Script Host 5.6? I
> haven't found this information anywhere. I know that you have to use
> VS2005 to be able to use .Net 2.0 so my guess is no!
>
> Ornulf Schomer
> Norway
Ornulf Schomer - 02 Mar 2006 13:52 GMT
Ok! Thanks alot! I can see the sense in that. I think there is some stuff
about Com Wrapping in a ADO.NET book I have so I just have to read up on
that.
Ornulf
> Hi,
>
[quoted text clipped - 13 lines]
>> Ornulf Schomer
>> Norway
Patrice - 02 Mar 2006 16:43 GMT
The big picture of what you are trying to do do may also help.
It looks a bit strange to me (i.e. you could perhaps compile a .NET 2.0
script that does what you need instead of exposing .NET 2.0 objects througt
COM so that they are usable from WSH ?).

Signature
Patrice
> Ok! Thanks alot! I can see the sense in that. I think there is some stuff
> about Com Wrapping in a ADO.NET book I have so I just have to read up on
[quoted text clipped - 19 lines]
> >> Ornulf Schomer
> >> Norway