Jump to content

Recommended Posts

Posted

I've been pulling my hair out on this one all day - 2003/XP network, in the Student GPO a login script is supposed to be run that sets all printers using a simple "if a text file then printui.dll" type command. Today though - no students appear to be running the login script at all. I haven't changed the script or the location (NETLOGON share), or permissions though logged in as student I can't browse to NETLOGON anymore - I get a "Access to resource has been disallowed" error. If anyone has an idea of what to check next - I'd much appreciate hearing it. One other thing I noticed while doing this - the NETLOGON folder on one of the other servers is not syncing up to the main one now either...don't know if thats connected...

 

Cheers.

Posted

Have you checked the event logs in both servers? This is a good starting point. Use this with eventid.net and you should be able to work out whats up.

 

fooby

Posted
Is there any reason why you don't leave the script in the GPO?

 

Not at all - I didn't realise you could - how do you do that?

 

Easy... Go to GP editor, User Config, Windows Settings, Scripts, Logon, properties, then I think it's 'show files...'. This will bring up an explorer window. Drag the files in here then close the window. No when you click 'add', you should see the script.

Posted
Is there any reason why you don't leave the script in the GPO?

 

Not at all - I didn't realise you could - how do you do that?

 

Easy... Go to GP editor, User Config, Windows Settings, Scripts, Logon, properties, then I think it's 'show files...'. This will bring up an explorer window. Drag the files in here then close the window. No when you click 'add', you should see the script.

 

Ta - I'll give it a go - coz its been driving me crazy today.

Posted
OK - I put the script within AD - and still nothing - first statement is an echo and a pause - so its not even getting that far (I guess) - I've made sure scripts are processed in the foreground. I've created a shortcut to the original script in a student login area and can run it fine from there - so its not a permissions problem. I've run the GP Modelling - which shows the correct GPOs should be applying - can anyone think of anything else that could be causing this problem??
Posted

When in doubt, I try changing a few things to see what happens..

 

Try running a logon script of a different type...

Create a simple .VBS logon script eg.

msgbox "I'm the logon script"

Save it as TEST.VBS and test it by double clicking. You should see a simple message box. Now add it to your GPO as a logon script (I would remove the link to the original so that TEST.VBS is the only script). Now try the logon and see if it works.

Posted

OK - the GP Results Wizard shows everything applying OK. AJBs test.vbs worked fine! But setting back to a .bat file didn't work again &*^%^%

 

Could I have denied running .bat files in some way that I haven't realised?

Posted

OK - the GP Results Wizard shows everything applying OK. AJBs test.vbs worked fine! But setting back to a .bat file didn't work again &*^%^%

 

Could I have denied running .bat files in some way that I haven't realised?

Posted
what happens if you just do the same with the bat logon file or even if you just try to execute a bat file whilst logged into a local admin account on a client machine ( Does the bat file execute or does it just sit in the processes but doesnt do anything or what exactly ) ??
Posted

just a thought but what happens if he has bat files restricted from running in his GPO ( cant remember what section or the name of it ) but basically where you can list what file types are allowed to run and what user(s) can execute etc.

 

hopefully Im not sounding too crazy lol, he might have the bat file in that list which is stopping it from executing ?

Posted

@SpuffMonkey: Any reason why you are using .BAT? Try renaming it as a .CMD

 

I've never tried running .BAT files from GPO assigned logon scripts, but .CMD should be no problem. .BAT files are executed by COMMAND.COM whereas .CMD are executed by CMD.EXE. If the change works, then it may be something to do with this difference.

Posted

OK - we seem to have hit on a solution - one of my techies tried setting the scripts to run synchronously - and *shazam* it all started working again - no idea why because the teachers GPO is still "Not Configured" in that respect and runs just fine - as this one did for 15 months - until last week???

 

Anyway - its a kick to get on and rejig a more elegant sctript in vbs.

 

Thanks for all your suggestions - much appreciated.

Posted
what do you mean by this

 

"Anyway - its a kick to get on and rejig a more elegant sctript in vbs."

 

??

 

I mean its time for me to write a vbs script to handle printer assignation at logon, rather than keep on using .bat files.

 

In answer to your other question - from memory GPO - User Config/Administrative Templates/System/Scripts

Posted
Anyway - its a kick to get on and rejig a more elegant sctript in vbs.

 

Be careful! When I got the urge to convert my logon script to .VBS (or .WSF in my case), I ended up with a several hundred line behemoth which in some ways is less manageable than the old .BAT file !!

Posted

Yeah- I think we knock the old .BAT files too quickly. There's nothing quite like knocking up a BAT file to map some drives. Oh- and to assign printers- to name two. Those old DOS commands seem really familiar. Whereas with vbs I get put off learning it because of all the bad press bad VB programming gets. Everyone and their dog can do it (they say). Yuck.

 

Paul

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...