Login | |
|
 |
RE: network login script with no domain - 7/5/2007 11:49:03 PM
|
|
 |
|
| |
SAPIENScripter
Posts: 276
Score: 2
Joined: 11/1/2006
From: SAPIEN Technologies
Status: offline
|
You'll have to copy the script to each machine. I'd create a shortcut in the Startup Folder so it will run each time they logon. I'd also have the script prompt them for a username and password so you don't have to customize the script for each user. If you really want to get fancy, add code at the end of the script to check the version of the script against a network copy and if the newtork copy is newer, copy it to the machine. This way you can update the logon script without having to revisit each machine.
_____________________________
Jeffery Hicks Windows PowerShell MVP SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com Follow Me: http://www.twitter.com/JeffHicks
|
|
| |
|
|
|
 |
RE: network login script with no domain - 7/6/2007 3:47:37 AM
|
|
 |
|
| |
kracksmith
Posts: 198
Score: 0
Joined: 2/24/2005
From:
Status: offline
|
ok i've done a little research and now i need help. how come i can't map the drives? worst comes to worst i can have his mapped drive window open but i don't want that. Option Explicit 'on error resume next Dim oWS, oWN, sUserID, sPW, objNet Set oWS = WScript.CreateObject("WScript.Shell") Set oWN = WScript.CreateObject("WScript.Network") Set objNet = WScript.CreateObject("Wscript.Network") sUserID = GetResponce(" Remote Logon Name", "user1", "jdoe") If sUserID = "" Then Call CleanUp() sPW = GetResponce(" Remote Password", "password1", "happycat") If sPW = "" Then Call CleanUp() objNet.MapNetworkDrive "F:", "\\server\DATA", True objNet.MapNetworkDrive "R:", "\\server\Document Control", True objNet.MapNetworkDrive "S:", "\\server\COMMON", True objNet.MapNetworkDrive "U:", "\\server\USERS_snapw2k5\Domain1\user1", True 'oWN.MapNetworkDrive "U:", "\\server\USERS_snapw2k5\Domain1\user1", False, sUserID,sPW 'oWS.Run "explorer.exe /n , , U:\", 1, True 'oWN.MapNetworkDrive "F:", "\\server\DATA", False, sUserID,sPW 'oWS.Run "explorer.exe /n , , F:\", 1, True 'oWN.MapNetworkDrive "R:", "\\server\Document Control", False, sUserID,sPW 'oWS.Run "explorer.exe /n , , R:\", 1, True 'oWN.MapNetworkDrive "S:", "\\server\COMMON", False, sUserID,sPW 'oWS.Run "explorer.exe /n , , S:\", 1, True Call CleanUp() Sub CleanUp() Set oWS = Nothing Set oWN = Nothing WScript.Quit End Sub Function GetResponce(sItem, sValue, sHint) GetResponce = InputBox ( "Enter your " & sItem & vbCrlf & _ "then Click Ok." & vbCrlf & vbCrlf & _ "Example: " & sHint, "Remote Authinication", sValue) End Function
|
|
| |
|
|
|
 |
RE: network login script with no domain - 7/7/2007 1:44:00 PM
|
|
 |
|
| |
sheepz
Posts: 247
Score: 2
Joined: 3/17/2006
From: Riverside the 909s
Status: offline
|
kracksmith, it seems to work fine for me... the only thing i could see that might be problematic is the login name... are the users typing in just "username" or are they using "Domain\Username"? might be authentication problem... if you have only one domain just code it in, if not have the user type in domain\username for the inputbox function 'on error resume next Dim oWS, oWN, sUserID, sPW, objNet Set oWS = WScript.CreateObject("WScript.Shell") Set oWN = WScript.CreateObject("WScript.Network") Set objNet = WScript.CreateObject("Wscript.Network") sInput = GetResponce(" Remote Logon Name", "user1", "jdoe") sUserID = "DomainName\" & sInput If sUserID = "" Then Call CleanUp() sPW = GetResponce(" Remote Password", "password1", "happycat") If sPW = "" Then Call CleanUp()
< Message edited by sheepz -- 7/7/2007 1:45:22 PM >
|
|
| |
|
|
|
 |
RE: network login script with no domain - 7/9/2007 1:11:03 PM
|
|
 |
|
| |
sheepz
Posts: 247
Score: 2
Joined: 3/17/2006
From: Riverside the 909s
Status: offline
|
opps i forgot to post this line, i got the same error for line 11, i just added: objNet.MapNetworkDrive "F:", "\\server\DATA", True, sUserID, sPW
|
|
| |
|
|
|
|
|