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.

Issue:

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:

RUNDLL32 PRINTUI.DLL,PrintUIEntry
prnport.vbs
prnmngr.vbs

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.

Thanks




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

Thanks
Mathi
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?

cheers,

Florian
--
Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Alan Bastanpour replied on 03-Dec-07 04:41 PM
Yes,
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
www.bradshawestates.com
Alan Bastanpour replied on 03-Dec-07 04:42 PM
Hi there..

Sure...
This is one of them:

rem ****** Add IP Port
***********************************************************************************
Cscript %windir%\system32\Prnport.vbs -a -r IP_11.15.25.61 -h 11.15.25.61 -o
raw -n 9100
rem *****Insall driver and Printer with IP Port
connection*************************************************************************
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
www.bradshawestates.com
Florian Frommherz [MVP] replied on 04-Dec-07 12:59 AM
Howdie!

Alan Bastanpour schrieb:

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

cheers,

Florian
--
Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Alan Bastanpour replied on 04-Dec-07 05:39 PM
Well;

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
www.bradshawestates.com