Windows Server - install printers based on the active directory OU by pushing a machine startup script

Asked By Alan Bastanpour on 29-Nov-07 07:08 PM
Install printers based on the active directory organizational unit by
pushing a machine startup script.


This idea would work perfectly as our active directory is for the most part
organized by a computers physical location in a school. A machine startup
script which can be found in the group policy editor under Computer
Configuration\Windows Settings\Scripts\Startup is different from a login
script as it is run on the target machine before a user even logs into a
computer. After creating a GPO with my printer installation script set as a
startup script I linked the GPO to a test OU where I began my testing.
Unfortunately, this setup didn't seem to want to work. When the computers in
the OU would boot up I would receive a message stating the access was denied
to add the printer. I knew that the problem was not with permissions
accessing the scrip.  The access denied message is coming from the local
machine.  It appears the "Domain Computers" account doesn't have enough
access to create the printers.  I have added the "domain computers" to the
local "Power Users" account, but I still get the same error.

The script I am running uses:


I use the above in a cmd file to create a local TCP/IP Port then I install a
local Pinter and driver.  Then I map it to the local TCP/IP port.
There is no print sever anywhere.

I basically want to create an OU called "Printer Installs", and I want to
move machines into this OU.  By doing so, the machines would get the printer
installed via computer startup scripts through group policies.  This
procedure would be useful, because we image massive number of workstations.
However, I believe, I am limited by Microsoft.

I have even considered using the loopback feature of group policies, but you
still have to login to the machine for the script to run.

Any how, I am wondering if there is something I am missing.  Any directions
or help would be appreciated.


math replied on 01-Dec-07 12:52 PM
If you are interested in the commercial tool please try
It provides lot of predefined configurations also provide the detailed
status once the configuration task is over

Florian Frommherz [MVP] replied on 30-Nov-07 03:05 AM
Howdie Alan!

Alan Bastanpour schrieb:

Could you please paste a few lines of your script?


Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
Alan Bastanpour replied on 03-Dec-07 04:41 PM
I have seen this product in my pervious life as I used to run an IT
department.  Unfortunately, due to back stabbing and betrays of people
appearing as friends; I no longer have access to purchasing products such as
this one.

On top of that, we cannot use kixstart scripting either.  So, I am limited
to using windows command line in a cmd shell.  My command line is correct,
however I am hitting some MS limitation..

But, thank you for replying...

Any other suggestions?

Bradshaw Estates HOA
Alan Bastanpour replied on 03-Dec-07 04:42 PM
Hi there..

This is one of them:

rem ****** Add IP Port
Cscript %windir%\system32\Prnport.vbs -a -r IP_11.15.25.61 -h -o
raw -n 9100
rem *****Insall driver and Printer with IP Port
Cscript %windir%\system32\prnmngr.vbs -d -p "room Printer"
rundll32 printui.dll,PrintUIEntry /if /b "room Printer" /f
LaserJet 2430 PCL 6"
rundll32 printui.dll,PrintUIEntry /y /n "room Printer"

Bradshaw Estates HOA
Florian Frommherz [MVP] replied on 04-Dec-07 12:59 AM

Alan Bastanpour schrieb:

You didn't change the access permissions to the printers, did you?


Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
Alan Bastanpour replied on 04-Dec-07 05:39 PM

This is what I want to accomplish:

I want to have an OU where by moving computers in to it the printer would
get installed.  I want the install to happen under machine scripts. This is
not going to be a user base install. That's where my script comes in play.
So, not sure If I am on the right page with you.  Do you see what I am
trying to do?

Bradshaw Estates HOA