I would like to create a script that would prompt for a login name password and domain name. Then it would take the variables and use the net use command to map a drive to a server that was specified in the script. What I have tried is the following:
Option Explicit
Dim name,WshShell,username
set WshShell = WScript.CreateObject("WScript.Shell")
Wscript.StdOut.WriteLine "Enter your name: "
username = Wscript.StdIn.ReadLine
WshShell.run "net use \\server_name /user:domain_name \"& username &""
but it does not work. Can anyone help me fix it?
Regards,
Option Explicit
Dim name,WshShell,username
set WshShell = WScript.CreateObject("WScript.Shell")
Wscript.StdOut.WriteLine "Enter your name: "
username = Wscript.StdIn.ReadLine
WshShell.run "net use \\server_name /user:domain_name \"& username &""
but it does not work. Can anyone help me fix it?
Regards,