Advertisement

05.15.2008 at 09:19AM PDT, ID: 23405792 | Points: 500
[x]
Attachment Details

Group Policy Map Drive Logon Script

Asked by teamorange in Windows 2003 Server

I have been searching and have tried multiple pieces of code on this site and others with no results yet, very close but not exactly yet.

I want to map one drive at startup for all users.  But I don't want anything popping up saying its been mapped or another drive disconnected first, etc...  Just want it to disconnect the s: drive if they have it already mapped and map the new s: drive.  All silent...

This small VB code worked great, but I don't know the piece to add to disconnect drive if in use:

Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "S:" , "\\servername\shared"

Running on MS Windows Server 2003.  Thanks.

Start Free Trial
[+][-]05.15.2008 at 09:26AM PDT, ID: 21575411

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 09:27AM PDT, ID: 21575421

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 09:27AM PDT, ID: 21575428

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 09:28AM PDT, ID: 21575439

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628