I''m trying to setup a vbs script to prompt a user to enter their username & password to map through to a third party network. I've come up with the script below which prompts correctly, however i'm unsure if i'm storing the entered details correctly and then how to use these when mapping the network drive.
x=msgbox("Please logon with your Username and Password. The username will be of the form Domain\Username. Remember to include the Domain\" ,0, "Login to System")
strUsername = Inputbox("Enter Your Username" ,, "Username")
strPassword = Inputbox("Enter Your Password" ,, "Password")
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "l:" , "\\192.168.68.48\test" /user:" & strUsername & /pass:" & strPassword
Any information on achieve this would be really appreciated.
Thanks