Logon Script Drive Mapping 
Author Message
 Logon Script Drive Mapping

Howdy
  Im having a problem updating a users problem so that a mapped network
drive will reconnect at login (the same as the /persistant switch when using
net use.  This is running on NT4 with SP4 and IE5; using WSH 2.0 beta also
with the 5.0 scripting engine install (tried without that too).  The code is
as follows (2 lines only):

Set WshNetwork = Wscript.CreateObject("Wscript.Network")
WshNetwork.MapNetworkDrive "Z:", " \\server\share", UpdateProfile=TRUE

The drives correctly map, (I've made the server\share generic for this post
due to Corp.security, but they dont get updated in HKCU Network section of
the registry.  In fact, it does the same exact thing whether or not I use
the UpdateProfile boolean.  I've tried using the letter 'b' infront of
UpdateProfile, using True, true, Yes, and I think I've even tried '1'.  Any
ideas?

Love to all
E-



Fri, 30 Nov 2001 03:00:00 GMT  
 Logon Script Drive Mapping
That should be
WshNetwork.MapNetworkDrive "Z:", " \\server\share", TRUE not
WshNetwork.MapNetworkDrive "Z:", " \\server\share", UpdateProfile=TRUE

This should work for you.

Clarence

--
http://cwashington.netreach.net

On THIS site you will find everything you need to get up and running. A
script repository with over 200 FREE sample scripts, a downloads section
with FREE COM objects for scripting, a library of reference materials and a
online discussion lounge to provide community based technical support. Check
it out.

Quote:
> Howdy
>   Im having a problem updating a users problem so that a mapped network
> drive will reconnect at login (the same as the /persistant switch when
using
> net use.  This is running on NT4 with SP4 and IE5; using WSH 2.0 beta also
> with the 5.0 scripting engine install (tried without that too).  The code
is
> as follows (2 lines only):

> Set WshNetwork = Wscript.CreateObject("Wscript.Network")
> WshNetwork.MapNetworkDrive "Z:", " \\server\share", UpdateProfile=TRUE

> The drives correctly map, (I've made the server\share generic for this
post
> due to Corp.security, but they dont get updated in HKCU Network section of
> the registry.  In fact, it does the same exact thing whether or not I use
> the UpdateProfile boolean.  I've tried using the letter 'b' infront of
> UpdateProfile, using True, true, Yes, and I think I've even tried '1'.
Any
> ideas?

> Love to all
> E-



Fri, 30 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Drive Mapping in Logon Script

2. A logon script that maps drives according to the users group memberships

3. Drive Mapping Error in Logon Script

4. Unable to map drive in logon script

5. A logon script that maps drives according to the users group memberships

6. vbscript logon script to determine what users are in what group to map a drive

7. How do I map a drive that has already been mapped

8. get drive size from network network mapped drives

9. Q: Logon Script Mapping?

10. Mapping shared printers with a Logon Script.

11. How to map a network drive with vb script

12. Login Script Drive Mapping

 

 
Powered by phpBB® Forum Software