Software > Computer programming

Script files

(1/1)

jmuench:
I am trying to write a script for a NT4.0 server to map drives for users, depending on what groups they are members of.  I cannot find the proper syntax for these IF statements and group names.  

For example
IF member == group net use h: \\servername\dir

where member == group means to "If the member logging in is in this group"

I am unsure of the syntax for member == group.

Can anyone help me?

natesneat2000:
I don't think that will work, but try the tool mentioned in this article:
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5869
hope that helps, GL (good luck cuz im lazy now ;D)

mims1979:
I'd say just have the batch file call at vbs that would give you a lot more capabilities

For instance, to map a drive:

Dim net, shell
set net = Wscript.CreateObject("Wscript.Network")
set shell = Wscript.CreateObject("Wscript.Shell")
net.MapNetworkDrive "X:", "\\computer\share", true, net.username

and there are hundreds of sites out there with the functions to check membership in WSH.

Navigation

[0] Message Index

Go to full version