Travis Wallace  United States Member since 4/14/2005
Registered Users Posts: 21
 |
| 12/01/2005 12:15 AM |
|
Hello all.
I am trying to use the regular login script to automatically map a network drive on all of my clients. I have edited the SBS_LOGIN_SCRIPT.bat file located at \\server\winnt\sysvol\sysvol\domain.local\scripts (the NETLOGON share). I added the following line:
net use m: \\servername\directory I tried rebooting a workstation to test it, and the drive is not mapping. I checked the event log on the workstation, and I don't see any errors. In the interest of full disclosure, the directory I am trying to map to is not just a one word name. Am I changing the wrong script, or is there something else I need to do to get this to work? If it doesn't, I can do it manually, but from what I have read, this should work. Any help would be appreciated. Thanks in advance. Travis
|
|
|
|
|
|
Steve Lister  New Zealand Member since 3/30/2005
Registered Users Posts: 234
 |
| 12/01/2005 01:26 AM |
|
Travis
Is the directory shared?
If the share name has a space in it, you will need to put quotes around it in the command
You can test this from a command prompt, so you don't have to keep logging out.
HTH
Steve |
|
|
|
|
|
Travis Wallace  United States Member since 4/14/2005
Registered Users Posts: 21
 |
| 12/01/2005 05:10 PM |
|
Steve,
Thanks for the reply. It is shared, so I put quotes around the line as you instructed. Still isn't mapping the drive. The syntax I used is as follows:
I just realized that the share name is exactly the same as the actual folder name. Should I change the share name to something different? Thanks for the help.
Travis |
|
|
|
|
|
Des Quinn  United Kingdom Member since 5/20/2005
Registered Users Posts: 281

 |
| 12/01/2005 06:01 PM |
|
what is the error when you try it from a command line?
can your ping the servr name?
|
|
|
|
|
|
Travis Wallace  United States Member since 4/14/2005
Registered Users Posts: 21
 |
| 12/01/2005 06:18 PM |
|
Des,
Thanks for the reply. The funny thing is that when I try it from the command line, it works like a charm. I can ping the server, and I can open the share from the Run dialog. Is there some sort of special syntax I have to use in the login script? From what I have seen there isn't, but that maybe everything I have seen assumes the reader knows the syntax. Thanks again for the help.
Travis |
|
|
|
|
|
Des Quinn  United Kingdom Member since 5/20/2005
Registered Users Posts: 281

 |
| 12/01/2005 06:35 PM |
|
put a pause after the command so you can see the displayed error mesage as the login scipt is being processed. |
|
|
|
|
|
Travis Wallace  United States Member since 4/14/2005
Registered Users Posts: 21
 |
| 12/01/2005 06:37 PM |
|
How do I do that?
Thanks,
Travis |
|
|
|
|
|
Des Quinn  United Kingdom Member since 5/20/2005
Registered Users Posts: 281

 |
| 12/01/2005 06:45 PM |
|
edit the login script
and type pause
save login script |
|
|
|
|
|
Travis Wallace  United States Member since 4/14/2005
Registered Users Posts: 21
 |
| 12/01/2005 06:59 PM |
|
Okay, here is the output on the command line from the batch file running:
C:\Documents and Settings\username.domain>\\servername\Clients\Setup\setup.exe /s servername
C:\Documents and Settings\username.domain>net use m:" \\servername\Ministry Shared Folders" System error 67 has occurred.
The network name cannot be found.
Thanks again for the help.
Travis
|
|
|
|
|
|
Mariette Knap  The Netherlands Member since 3/24/2005
Forum Admins Posts: 12904

 |
| 12/01/2005 09:09 PM |
|
Instead use a policy to attach this login script: Concentrix Login script ' Author: Concentrix b.v. [Mariëtte Knap] ' Date: 16-08-2005
On Error Resume Next Set nUser = WScript.CreateObject("Wscript.Network")
Do while nUser.username = "" WScript.Sleep 250
Loop Set IExplore = WScript.CreateObject("InternetExplorer.Application","event_")
Set Drives = nUser.EnumNetworkDrives IExplore.Navigate "about:Blank" IExplore.Width = 300 IExplore.Height = 350 IExplore.Toolbar = False
IExplore.StatusBar = False
IExplore.Visible = True
IExplore.Resizable = False
IExplore.Top = 10 IExplore.Left = 10 IExplore.Visible = True
StartTime = Now
Set UserObj = GetObject("WinNT://" & nUser.UserDomain & "/" & nUser.Username) UserName = "User"
Do While Not IExplore.ReadyState = 4 WScript.Sleep 250
Loop
IExplore.Document.Title = "Customer Name Loginscript" IExplore.Document.Body.Style.FontFamily = "Verdana" IExplore.Document.Body.Style.FontSize = "10" IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Customer Name " IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Your Company Name
" IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Running for " & nUser.UserName & " @" & Now & " @"&nUser.UserDomain&"
" IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & GroupStr & " " IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Mapping drives: "
For i = 0 To Drives.Count -1 Step 2 nUser.RemoveNetworkDrive Drives.Item(i) IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Removed " & Drives.Item(i) & " "
next
IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Connect drive G: with servername... " nUser.MapNetworkDrive "P:", "\\servername\folder3" IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Connect drive G: with servername... " nUser.MapNetworkDrive "G:", "\\servername\folder2" ' IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Connect drive G: with servername... "
nUser.MapNetworkDrive "Z:", "\\servername\folder1", false, "Loginname", "password" IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "End
" IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & "Loginscript took: " & DateDiff("s",StartTime,Now) & " second(s)..." IExplore.Document.Body.InnerHTML = IExplore.Document.Body.InnerHTML & " | |