Logon Scripting Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using GP to run a logon script. I am really really new to scripting and
would appreciate any help provided.



I want to write a script that will disconnect all network drives, then
based on user group map certain drives for each user group as they log into
our terminal server.

Atm I only have this script


' VBScript.' Timothy Hasty January 2005.
'
' Purpose of script to map various drives for WAN Clients
' ******************************
Dim objNet
on error resume next
Set objNet = CreateObject("Wscript.Network")
on error resume next
objNet.MapNetworkDrive "F:", "\\data\f"
on error resume next
objNet.MapNetworkDrive "G:", "\\dc2\g"
on error resume next
objNet.MapNetworkDrive "H:", "\\dc2\h"
on error resume next
objNet.MapNetworkDrive "O:", "\\dc1\optical"
on error resume next
objNet.MapNetworkDrive "S:", "\\data\s"
on error resume next
objNet.MapNetworkDrive "W:", "\\data\w"
on error resume next
WSCript.Quit

If anyone can help me I would appreciate it greatly.

I will have 3 groups of users. 04 coroporate. Locations, and LLC
 
Also wanted to add an aditional question.


After I run this script using GPO it will map the drives correctly. If I log
the user off of terminal services and relog back in all the drives show as
disconnected. I can click on each drive and it opens but it still says that
the drives are disconnected.


Additional information


Terminal servers are windows 2003
Domain controller is windows 2000

Using GPmanagement tool instead of old way
 
You might want to do two things:

1) check out Patrick Rouse's web site at http://www.workthin.com as there is
information there specific to having a 'normal' log on script as well as one
for Terminal Server,

2) check out Richard Mueller's web site at http://www.rlmueller.net as there
is information there specific to log on scripts ( .vbs files ) based on
group membership.

--
Cary W. Shultz
Roanoke, VA 24014
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 
Heres the script I use for the same thing. I use GPO security filtering and
OU assignment to direct different scripts to different users

net use g: /d
net use w: /d
net use t: /d

net use g: \\DFSshare.local\Share1\files\oldgdrive
net use w: \\DFSshare.local\Share1
net use t: \\DFSshare.local\Share1\files\departments

Disconnects the drives then remakes the connections

Hope that helps
stuart
 
Back
Top