Any chance of posting your vbs script for setting the default printer. I can't get mine to work.
Printable View
Any chance of posting your vbs script for setting the default printer. I can't get mine to work.
I use DEFPRINT to set the default
http://www.netadmintools.com/art194.html
Kinda fiddly but seems to work. You need to share the printers as it sets the default using that name.
I made a batch file which copies the DEFPRINT batch file to the startup menu on the computer which I put in the same OU as the PRINTERCONNECTIONS.EXE
The startup batch file only has \\servername\apps$\defprint /d "LRC2_B" in it which is the mapping to the defprint application and LRC2_B which is the share name of the app.
It works quite quickly too. The only think I have found is that the printers take a minute to appear so sometimes the script has already finished before the printer has appeared. This isn't an issue with the pupils who have mandatory profiles but does slow up with staff with unlocked profiles.
I can't get the user assigned printers to work so just went back to putting it in the logon script.
One thing I have found annoying is I wanted to delete all the remnants of the old printers so I put in a con2prt.exe /P in a logoff script but it didn't touch them. The script was working just the timing seemed to be off.
My first post after the kids are back and I waffle like crazy.
thanks, i'll give that a try.
What is con2prt? I have never heard of it.
oh look, 100 posts!
This should set the default printer:
Code:Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.SetDefaultPrinter "\\SERVER\PRINTER"
Should this be a logon or startup script or doesn't it matter?
Network printers are generally a per user setting, it needs to be a logon script. You can make it a startup script if you enable GP Loopback but I've found this works intermittently at best.
You need to put it in both thom. In the startup script so the machine loads the drivers and then in the login script so the user gets the printers in her/his profiles.
Avoid loopback processing it complicates things and is unneeded in this situation.
Thanks Brad P & Norphy. I just got a student to test that in a classroom and it worked perfectly! I will just have to monitor it and see if it works in other rooms but it looks promising.
Just to recap the solution for others,
(following my guide on previous page)
13) I created a script called DefaultPrinterLibrary.vbs containing
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.SetDefaultPrinter "\\SERVER\Library-Laser"
14) I then Created a new GPO called "Printers - Library Default"
15) I added the script to the starup and logon sections in the GP Editor
16) I set the order of the GPO's in the Library OU to 1, Push client, 2, Push Printer 3, Library default
Hi
Please can someone help. I am looking at using print management in windows 2003 r2. I have got it to deploy the printers to the machine under machine with no problems. Now I have to set the default print. I have a script that does it when I run it manually.
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.SetDefaultPrinter "\\print-server\HP4250"
But it does not set the the default.
I have set up a group policy to run the pushprinterconnections.exe
Then I set up a group policy to run and default printer set in the user and computer logon script.
This does not work. Have you any idea what I have done wrong or do I need a delay in the script as it is running too soon.
Thanks for all your help.
Richard
I'm sorry to hear so many of you are having R2 Print Management problems. I've always found this guide useful. I've deployed it to users, computers or a combination of both in quite a number of networks now.
The default printer is set alphabetically, so name your printers accordingly. As a recommendation, always use the latest printer drivers as some 'older' drivers can create problems.
Locally attached printers to workstations shouldn't be a problem. You can create additional print servers within the Print Management console. So long as you share it and set permissions correctly, it should behave the same as a network printer.
For simplicity, I always name printers and their sharenames the same, otherwise it can get complicated. I also give them proper names and you can safely ignore the MS-DOS compatibility warning when using spaces in your sharenames!
In a nutshell, you can't really set default printers. R2 print management will ensure the correct printer(s) are deployed to the appropriate user/group, but in a lot of cases the printer will still be installing anything upto 5 minutes after the user has logged on, so any startup/logon scripts probably wont see the printer hence why it's not being defaulted.
I havent looked at it yet but I think server 2008 client side preferences will allow you to set a default printer - but as it's per user only yo would need to use item targetting.
Hi could I place a pause at the start of the logon script that sets the default printer or would that stop the machine.
Something like
WScript.sleep 300000
to pause for 5 minutes
Richard:rolleyes:
Arrrrr I tried the sleep and it jams up the machine when it logs on.
Has anyone got any more ideas
Hi,
Sorry to drag up an old thread but I'm determined to find a solution!
We used to use policy maker for our printing needs but not that M$ own it there hasn't been updates for a good couple of years. And the final straw has come when some recent security updates have killed it!
I have setup print management in R2 which works quite well but the age old problem of setting the default printer remains but was something policy maker delt with.
We have Adobe Pro installed on most machines in the school which installed the printer driver as "Adobe PDF" that is the default on all machines its installed on.
I have tried running the script as shown in this thread and used Thom's points but still can't get the default to be one of the network printers I'm assigning. (per machine)
I have an OU for each computer room/ staff room and within there a GPO containing the deployed printers. As I understand it any settings put into the user configuration inside the GPO which is assigned to machines, will not apply to users logging into that room of computers as the users are in their own OU.
I understand why the script's are not setting the default printer as the printers don't appear until after 30secs or so as ricki has stated.
I have renamed the shared printer to aaLibraryBlack.
Also have considered renaming the Adobe PDF printer to xAdobe PDF printer but would cause issues if I choose to role back the software.
We have 2003 R2 domain controllers.
Any advice would be much appreciated, how do others deal with printing in schools?
Joe