Running an OU policy only after a previous OU policy completes?

S

Siv

Hi everyone,

This is my first attempt at setting up a Windows Server. We've always used
Novell Netware.

Anyway, I have a general default group policy for my entire company with a
login script which maps drives, adds printers, etc. which everyone in the
company needs.

Then I have departmental group policies which map extra drives if needed by
that department, and adds extra printers which are located close to them and
sets their default printer.

The problem is this: The departmental group policies seem to load at the
same time as the default company policy. So let's say I set a printer as
default in the department policy, but it hasn't loaded yet in the default
policy. I get an error saying the printer doesn't exist. It's because it
hasn't mapped yet.

Short of adding a Sleep of 30 secs. to the department policies, how do I get
these things to run only after the previous one completes? I've looked
everywhere, but can't seem to find a straight answer.

Thanks!
 
L

lforbes

Hi,

Actually scripts run one after the other by default. Here is the
details from MS group Policy - Computer Config- Admin Templates -
System - Scripts
By default, the system waits for each script to complete before it
runs the next script.

They are even in an order in Group Policy.

However, that error about the default printer is common. I get it even
with the scripts running. However although it does produce an error,
it does set the correct default.

I use the following to add printers to Computers rather than Users. I
put them in the computer startup script. Therefore they are on the
computer regardless of who logs in. For XP you have to do a Loopback
Policy for "merge" and then put it in the users login script as
well. The first adds the printer (/q is quitely with no errors). The
second sets the default.

rundll32 printui.dll,PrintUIEntry /in /q /n "\\server\printer"
rundll32 printui.dll,PrintUIEntry /y /n "\\server\printer"

Cheers,

Lara
 
C

CraigD

lforbes said:
Hi,

Actually scripts run one after the other by default. Here is
the details from MS group Policy - Computer Config- Admin
Templates - System - Scripts
[quote:6afd592d83]By default, the system waits for each script
to complete before it runs the next script.[/quote:6afd592d83]

They are even in an order in Group Policy.

However, that error about the default printer is common. I get
it even with the scripts running. However although it does
produce an error, it does set the correct default.

I use the following to add printers to Computers rather than
Users. I put them in the computer startup script. Therefore
they are on the computer regardless of who logs in. For XP
you have to do a Loopback Policy for "merge" and then put it
in the users login script as well. The first adds the printer
(/q is quitely with no errors). The second sets the default.

rundll32 printui.dll,PrintUIEntry /in /q /n "\serverprinter"
rundll32 printui.dll,PrintUIEntry /y /n "\serverprinter"

Cheers,

Lara

Thanks for your reply. I just joined.

What do you mean by "and then put it in the users login script as
well."? What should I put in the users login script?

I am using .vbs scripts in the user logins to add printers & drives.

I am going to browse this group right now to find more answers, I
didn’t know it existed! Maybe I’ll find some more clues

Thanks!
 
L

lforbes

CraigD said:
Thanks for your reply. I just joined the forums.

What do you mean by "and then put it in the users login script
as well."? What should I put in the users login script?

I am using .vbs scripts in the user logins to add printers &
drives.

I am going to browse this group right now to find more
answers, I didn't know it existed! Maybe I'll find some more
clues

Thanks!

Hi,

That may be your problem. I have never had much luck adding Printers
with .vbs logon scripts because regular users don’t usually have write
access to the Winnt directory where the computer needs to copy the
printer drivers. You can’t add a printer with a vbs startup script
because the engine doesn’t load in time and you get the error.

I use VBS for everything but adding printers and mapping drives. That
I do with the batch files.

Type rundll32 printui.dll,PrintUIEntry /? at the command line to get a
list of help.

What I meant about the users login as well.

My printers are added per computer. However, this is a PERMANENT add
so it is there for everyone who logs on until you delete it either
manually or with the delete printer script (note the /dl for delete)
rundll32 printui.dll,PrintUIEntry /dl /q /n "\\server\printer"

I have a Computer OU (with all the computers in it) where I Add a
Computer Group Policy. In the Computer Configuration section I enable
the Looback Processing Mode (admin temp-system-group policy) with
"Merge". What this does is anything in the User Configuration of
the COMPUTER Group Policy gets "merged" with the Users regular group
policy. In the Computer Configuration (computer GP) I put the Startup
Script and in the User Configuration I put the Same as a Logon Script.


What this means is when a computer in room 111 starts up, it adds the
Room 111 printer to the computer and copies the printer drivers from
the server. A User logs into that computer and the Room 111 Printer
is "readded" as a login script. I set the default at the login
script as well.

The reason I have to use the login script is for the Windows XP
machines. For some reason when you add it to the computer in Windows
XP it shows up in the registry but not in the Printers Section.

Cheers,

Lara
 
C

CraigD

lforbes said:
Hi,

That may be your problem. I have never had much luck adding
Printers with .vbs logon scripts because regular users don't
usually have write access to the Winnt directory where the
computer needs to copy the printer drivers. You can't add a
printer with a vbs startup script because the engine doesn't
load in time and you get the error.

I use VBS for everything but adding printers and mapping
drives. That I do with the batch files.

Type rundll32 printui.dll,PrintUIEntry /? at the command line
to get a list of help.

What I meant about the users login as well.

My printers are added per computer. However, this is a
PERMANENT add so it is there for everyone who logs on until
you delete it either manually or with the delete printer
script (note the /dl for delete)
rundll32 printui.dll,PrintUIEntry /dl /q /n "\serverprinter"


I have a Computer OU (with all the computers in it) where I
Add a Computer Group Policy. In the Computer Configuration
section I enable the Looback Processing Mode (admin
temp-system-group policy) with "Merge". What this does is
anything in the User Configuration of the COMPUTER Group
Policy gets "merged" with the Users regular group policy. In
the Computer Configuration (computer GP) I put the Startup
Script and in the User Configuration I put the Same as a Logon
Script.

What this means is when a computer in room 111 starts up, it
adds the Room 111 printer to the computer and copies the
printer drivers from the server. A User logs into that
computer and the Room 111 Printer is "readded" as a login
script. I set the default at the login script as well.

The reason I have to use the login script is for the Windows
XP machines. For some reason when you add it to the computer
in Windows XP it shows up in the registry but not in the
Printers Section.

Cheers,

Lara

Thanks Lara,

That’s a good explanation. Just a few more questions.

I created a Computer OU, and added a test computer. In the startup
script section of the Computer Config. I have the following:

# Map printers
rundll32 printui.dll,PrintUIEntry /in /q /n
"\\DOMAIN1\CanoniR550"
rundll32 printui.dll,PrintUIEntry /in /q /n
"\\DOMAIN1\CanoniR330"
rundll32 printui.dll,PrintUIEntry /in /q /n "\\DOMAIN1\IBM24"

# Map drives
net use G: \\DOMAIN1\COMMON
net use K: \\Domain1\APPLICATIONS
net use H: \\Domain1\Data

Now, you also add the exact same thing to the login script of the User
Config in the Computer OU?

When I did this, things looked good, except for the mapped drives,
they show up as, example: "Disconnected Network Drive (G:), although
they are really connected and I can see the contents. Can this be
fixed to show up as normal like "Common on \\DOMAIN1"?

To recap, by having the exact same script in 2 places, when you make
a change, you have to remember to do it in 2 places I guess?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top