Home All Groups Group Topic Archive Search About

.Net Framework 2.0 and WSH 5.6

Author
2 Mar 2006 7:36 AM
Ornulf Schomer
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

Author
2 Mar 2006 9:32 AM
Patrice
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 ?

--
Patrice

Show quote
"Ornulf Schomer" <ornulf.scho***@nrk.no> a écrit dans le message de
news:O4pQDAdPGHA.3896@TK2MSFTNGP15.phx.gbl...
> 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
>
>
Author
2 Mar 2006 12:03 PM
Ornulf Schomer
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

Show quote
"Patrice" <a@bc.c> wrote in message
news:%23gLY5wdPGHA.740@TK2MSFTNGP12.phx.gbl...
> 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 ?
>
> --
> Patrice
>
> "Ornulf Schomer" <ornulf.scho***@nrk.no> a écrit dans le message de
> news:O4pQDAdPGHA.3896@TK2MSFTNGP15.phx.gbl...
>> 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
>>
>>
>
>
Author
2 Mar 2006 1:02 PM
Dmytro Lapshyn [MVP]
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.

Show quote
"Ornulf Schomer" <ornulf.scho***@nrk.no> wrote in message
news:O4pQDAdPGHA.3896@TK2MSFTNGP15.phx.gbl...
> 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
>
Author
2 Mar 2006 1:52 PM
Ornulf Schomer
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


Show quote
"Dmytro Lapshyn [MVP]" <x-code@no-spam-please.hotpop.com> wrote in message
news:eRpoSmfPGHA.1132@TK2MSFTNGP10.phx.gbl...
> 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.
>
> "Ornulf Schomer" <ornulf.scho***@nrk.no> wrote in message
> news:O4pQDAdPGHA.3896@TK2MSFTNGP15.phx.gbl...
>> 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
>>
>
Author
2 Mar 2006 4:43 PM
Patrice
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 ?).

--
Patrice

Show quote
"Ornulf Schomer" <ornulf.scho***@nrk.no> a écrit dans le message de
news:OyZefCgPGHA.1532@TK2MSFTNGP12.phx.gbl...
> 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
>
>
> "Dmytro Lapshyn [MVP]" <x-code@no-spam-please.hotpop.com> wrote in message
> news:eRpoSmfPGHA.1132@TK2MSFTNGP10.phx.gbl...
> > 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.
> >
> > "Ornulf Schomer" <ornulf.scho***@nrk.no> wrote in message
> > news:O4pQDAdPGHA.3896@TK2MSFTNGP15.phx.gbl...
> >> 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
> >>
> >
>
>

AddThis Social Bookmark Button