19 февраля 2009 г. 17:33A user in a domain needs to map a drive and associate an lpt2 port to a printer on a server that is not in the domain. I'm not sure if that is possible but I tried to add this to our VB login script and it is not running. Any help would be appreciated. thanks in advance.
do I have the correct syntax and all of the quotes in the right places?
20 февраля 2009 г. 2:18МодераторThe syntax looks fine. I'm assuming the share argument (\\server\share) is enclosed in quotes. However, if you have defined the share and NTFS permissions to give access to the user, you need not specify the user and password arguments in your script anymore (unless you are mapping with different credentials).
Salvador Manaois III
MCITP | Enterprise & Server Admin
MCSE MCSA MCTS CIWA C|EH
Bytes & Badz: http://badzmanaois.blogspot.com
20 февраля 2009 г. 20:22Dim objNetwork
Set objNetwork = WScript.CreateObject("WScript.Network")
strLocalDrive = "L:"
strRemoteShare = "\\server\C$\C share"
strPer = "FALSE"
strUsr = "username"
strPas = "password"
objNetwork.MapNetworkDrive strLocalDrive, strRemoteShare, strPer, strUsr, strPas