Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon script map network persistent inVista

Status
Not open for further replies.

mickelingon

IS-IT--Management
Nov 7, 2007
1
SE
Hi

I have a logonscript for vista that map network drives.
But I don't get them to be persistent.
So when I logoff and disconnect they are gone when login on to vpn for example.
How can I solve this?
This is what it looks like

If InGroup("HK_Alla") Then
MapDrive "g:", "\\aphk-file\gemensam"
MapDrive "h:", "\\aphk-file\" & Username
MapDrive "m:", "\\aphk-file\mallar"
MapDrive "p:", "\\aphk-file\program"
end If

Thanks

Mikael
 
I'm guessing MapDrive is your own sub/function calling the MapNetworkDrive method of WSHNetwork...are you setting the third parameter to "True"?

MS Documentation
object.MapNetworkDrive(strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword])

object
WshNetwork object.

strLocalName
String value indicating the name by which the mapped drive will be known locally.

strRemoteName
String value indicating the share's UNC name (\\xxx\yyy).

bUpdateProfile
Optional. Boolean value indicating whether the mapping information is stored in the current user's profile. If bUpdateProfile is supplied and has a value of true, the mapping is stored in the user profile (the default is false).

strUser
Optional. String value indicating the user name. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user.

strPassword
Optional. String value indicating the user password. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top