M
Mikem
<html>
<head>
<title>Central Login</title>
</head>
<body onload="resize()">
<center>
Please enter your login credentials below:
<form name="loginform">
Username: <input type="text" name="user"><br>
Password: <input type="password" name="pass"><br><br>
<input type="button" name="login" value="Login" onclick="auth()">
</center>
</body>
<script language="vbscript">
Sub resize
window.resizeTo 400,197
End Sub
Function auth()
dim user
user = document.forms.loginform.user.value
dim pass
pass = document.forms.loginform.pass.value
dim server
server = "Central"
dim server_unc
server_unc = ("\\" & server)
dim user_drive
user_drive = "U:"
dim users_folder
users_folder = "Users"
dim users_unc
users_unc = (server_unc & "\" & users_folder)
dim user_unc
user_unc = (users_unc & "\" & user)
dim docs_drive
docs_drive = "Z:"
dim docs_folder
docs_folder = "Docs"
dim docs_unc
docs_unc = (server_unc & "\" & docs_folder)
dim auth_command
auth_command = ("net use " & server_unc & " " & "/user:" & user &
" " & chr(34) & pass & chr(34))
dim user_drive_command
user_drive_command = ("net use " & user_drive & " " & user_unc &
" /persistent:no")
dim docs_drive_command
docs_drive_command = ("net use " & docs_drive & " " & docs_unc &
" /persistent:no")
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "cmd.exe /c " & auth_command
WshShell.Run "cmd.exe /c " & user_drive_command
WshShell.Run "cmd.exe /c " & docs_drive_command
dim endmessage
endmessage = ("Welcome, " & user & ". All login commands have
been run.")
msgbox endmessage
window.close()
End Function
</script>
</html>
<head>
<title>Central Login</title>
</head>
<body onload="resize()">
<center>
Please enter your login credentials below:
<form name="loginform">
Username: <input type="text" name="user"><br>
Password: <input type="password" name="pass"><br><br>
<input type="button" name="login" value="Login" onclick="auth()">
</center>
</body>
<script language="vbscript">
Sub resize
window.resizeTo 400,197
End Sub
Function auth()
dim user
user = document.forms.loginform.user.value
dim pass
pass = document.forms.loginform.pass.value
dim server
server = "Central"
dim server_unc
server_unc = ("\\" & server)
dim user_drive
user_drive = "U:"
dim users_folder
users_folder = "Users"
dim users_unc
users_unc = (server_unc & "\" & users_folder)
dim user_unc
user_unc = (users_unc & "\" & user)
dim docs_drive
docs_drive = "Z:"
dim docs_folder
docs_folder = "Docs"
dim docs_unc
docs_unc = (server_unc & "\" & docs_folder)
dim auth_command
auth_command = ("net use " & server_unc & " " & "/user:" & user &
" " & chr(34) & pass & chr(34))
dim user_drive_command
user_drive_command = ("net use " & user_drive & " " & user_unc &
" /persistent:no")
dim docs_drive_command
docs_drive_command = ("net use " & docs_drive & " " & docs_unc &
" /persistent:no")
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "cmd.exe /c " & auth_command
WshShell.Run "cmd.exe /c " & user_drive_command
WshShell.Run "cmd.exe /c " & docs_drive_command
dim endmessage
endmessage = ("Welcome, " & user & ". All login commands have
been run.")
msgbox endmessage
window.close()
End Function
</script>
</html>