Question

Locked

Login Scripts not working

By captn.dude ·
Hi All,

I am trying to set-uo a mapped drive at logon for an OU. I am no system admin so please bear with me. I am using the follwing script syntax:
Set objNetwork = CreateObject("wScript.Network")
objNetwork.MapNetworkDrive "Q:" , "\\srv9\applications"

I have also tried the following .bet file in place of the vbs with no change in the results:

net use q: \\srv9\applications persistent:yes

I then assigned that using the Group policy management mmc snap-in to everyone in the OU. When they login nothing happens. FYI I put the script in the default directory that the GPO snap-in asked for. (\\"FQDN"\SysVol\"FQDN"\Policies\{AC6BDDD8-8B3D-4BAD-B9FF-92C5D33F4895}\User\Scripts\Logon) Where "FQDN" is our domain. Before anyone asks why drive mappings vs UNC, the remote application requires it.

This conversation is currently closed to new comments.

16 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Syntax

by Jellimonsta In reply to Login Scripts not working

Set objNetwork = CreateObject("WScript.Network")

You had the w and S capitalization transposed in your example.

http://tinyurl.com/mzekm

Regards.

Collapse -

Thanks Jelli

by captn.dude In reply to Syntax

transposed or I just forgot to capitalize the "W"?

Collapse -

Working now?

by Jellimonsta In reply to Thanks Jelli

So, are you off to the races now? Or are the scripts not working using GPO?

http://www.rlmueller.net/LogonScriptFAQ.htm

Collapse -

Not yet

by captn.dude In reply to Working now?

The script(s) work if I visit a workstation and execute the vbs things are fine. Via GPO it works for two of the users but doesn't work for all of the users even though they are all in the same OU. Weirdness.

Collapse -

Similarities

by Jellimonsta In reply to Not yet

What are the similarities and disparities of the users? OS, security priviliges? You <i>may </i> need to use a .bat file to call the .vbs.

Collapse -

Something like this

by Jacky Howe In reply to Similarities

You can copy CScript.exe and logon.vbs to the NetLogon folder, modify and call the batch from your proper logon script.

Example:

:SCRIPT
: Run logon script proper
%0\..\CScript.exe %0\..\logon.vbs //Nologo

Collapse -

Hmmm

by captn.dude In reply to Something like this

What is this script doing? I don't know what CScript.exe and logon.vbs do. This is not my primary role with this company, we just lost our sysadmin.
My issue is that when a user executes the vbs locally, all is fine. I simply cannot get logon scripts to run for all users within an OU using GPO. It does work for two of the five with no issues at all.

Collapse -

Similiarities etc

by captn.dude In reply to Similarities

They are all domain users with standard privs. there is no logical reason for the disparity, I went and adjusted the GPO to allow for "slow network connections", we'll see if that helps. Worst case I just have them map a persistent drive by actually sending them the vbs. It's just frustrating.

Collapse -

OS?

by Jellimonsta In reply to Similiarities etc

Are they all running XP SP2 or greater?

I would generally have a batch file (or CMD) in the NETLOGON call the script.

Have you tried creating logon.cmd in the NETLOGON share with the following entries?

call Wscript %logonserver%\netlogon\logon.vbs //e:vbscript

Also, have you verified the users who are not functional have 'Connect client shares at logon' checked in the 'Environment' tab of their user properties?
Regards.

Collapse -

OS? cont

by captn.dude In reply to Working now?

Everyone is running XP SP2. I do have a question about your script.

"Have you tried creating logon.cmd in the NETLOGON share with the following entries?

call Wscript %logonserver%\netlogon\logon.vbs //e:vbscript

Also, have you verified the users who are not functional have 'Connect client shares at logon' checked in the 'Environment' tab of their user properties?
Regards. "

All users have "Connect client drives at logon" selected. With respect to your script, Should I use that exact syntax? What is //e:vbscript? And where is NETLOGON, sorry for the n00b questions. Also, this site is not emailing when you reply so sorry for the delay.

Back to Hardware Forum
16 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums