Does anyone know how to get the username and password in VBScript? I want to be able to map a network drive and pass the logon credentials to it.
set net = Wscript.CreateObject("Wscript.Network"
net.MapNetworkDrive "Z:", "\\server\share", , "sUserName", "sPassWord"
I know I can probably use "InputBox" to get the username into the sUserName variable, but this wouldn't work for the password as it will display it in plain text. Is there a way to mask the password???? Or is there a better way to get access to a network resource?
set net = Wscript.CreateObject("Wscript.Network"
net.MapNetworkDrive "Z:", "\\server\share", , "sUserName", "sPassWord"
I know I can probably use "InputBox" to get the username into the sUserName variable, but this wouldn't work for the password as it will display it in plain text. Is there a way to mask the password???? Or is there a better way to get access to a network resource?