VB script problem
Hi,
Is there any way include user name with password to map a network share in VB script. example: username: mejhone password: support, network shard: \\csg_app\merchshare
can this be done?
Thank you.
Windows Forum
Hi,
Is there any way include user name with password to map a network share in VB script. example: username: mejhone password: support, network shard: \\csg_app\merchshare
can this be done?
Thank you.
by tamj123
by rewrite
See this link:
http://visualbasic.ittoolbox.com/documents/document.asp?i=2938
Cheers.
RW
by tamj123
not what i asking. i need this to be part of my vb login script.
If you put this in your logon script it should do what you want.
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "E:", "\\Your_Server\share_name"
This will use the username and password of the user who is logging on.
you can put "username@domain","password" at the end if you want.
i.e. if you wish to map a share user2 can access but user1 can't to user1's account do the following in user1's logon script
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "E:", "\\Your_Server\share_name","user2@domain","user2_password"
Good luck
by tamj123
Poster rated this answer.
by tamj123
This discussion is closed to new replies.
Sort by Trending