I am a relative newbie @ VBS. I am in need of some help finding a function that gathers the password much like the username is gathered from the machine. Here is the code that I am using so far.
Set WSHNetwork = CreateObject("WScript.Network")
Set netobj=wscript.createobject("wscript.network")
username=netobj.username
Password = InputBox("Please Enter Your Network Password","Password?")
WSHNetwork.MapNetworkDrive "X:", "\\Server1\Filename",True,UserName,Password
WSHNetwork.MapNetworkDrive "Y:", "\\Server1\Home\" &username,True,UserName,Password
I am looking for something that essentially will do the same thing as "username=netobj.username", except for the password??
Also, are the first two lines of this code redundant??
Any suggestions, comments, snide remarks would be greatly appreciated.
Jamie
Set WSHNetwork = CreateObject("WScript.Network")
Set netobj=wscript.createobject("wscript.network")
username=netobj.username
Password = InputBox("Please Enter Your Network Password","Password?")
WSHNetwork.MapNetworkDrive "X:", "\\Server1\Filename",True,UserName,Password
WSHNetwork.MapNetworkDrive "Y:", "\\Server1\Home\" &username,True,UserName,Password
I am looking for something that essentially will do the same thing as "username=netobj.username", except for the password??
Also, are the first two lines of this code redundant??
Any suggestions, comments, snide remarks would be greatly appreciated.
Jamie