wellwillthisnamedothen Posted June 6, 2007 Posted June 6, 2007 For a while now I've been trying to set a specific printer as the default printer for all users in a computer suite. The domain is managed by Ranger but as the school does not have their print manager the support desk won't help. I found a bit of code that will set the default, but only for a user, by saving it as a .cmd and placing it in the all users startup folder of every work station, anyone logging in has the required network printer as default. It is tested and works (but only two days so far). Is there a more elegant solution? the line of code is- rundll32 printui.dll,PrintUIEntry /y /n\\PrintServer\PrinterSharedName where of course you have to substitute for printserver and printersharedname.
alonebfg Posted June 6, 2007 Posted June 6, 2007 ok I am not being funny but i am sure i have seen this on the fourm befor i beleve have a look here you might find what you are looking for http://www.edugeek.net/index.php?name=Forums&file=viewtopic&t=404 just run a script like the one here but just do it for default and do it at user login. (i am sure someone will correct me if i am wrong)
tosca925 Posted June 6, 2007 Posted June 6, 2007 I have two printers in each IT suite, I add these printers by 2 seperate logon scripts with the one script telling it which is the default printer. IE I have a mono laser and a colour laser in certain rooms. Now we dont want the default printe to be the colour so i add a little line in the script of the mono and it then sets it as default.
Guest Posted June 6, 2007 Posted June 6, 2007 we found rather then all these domain printer scripts using something simple like Set WshNetwork = CreateObject ("WScript.Network") WshNetwork.AddwindowsPrinterConnection "\\bcfeps01\bg08-staff" WshNetwork.AddwindowsPrinterConnection "\\bcfeps01\bg08-colour" WshNetwork.SetDefaultPrinter "\\bcfeps01\bg08-staff" saved as vbs in all users programs startup folder on each pc change for each room and printer
tosca925 Posted June 6, 2007 Posted June 6, 2007 Thats similar to our script but its easier to manage via in GPO than all users folder.
wellwillthisnamedothen Posted June 7, 2007 Author Posted June 7, 2007 alonebfg I don't know if your ref does cover the point, I cannot see the script, (I dunno why) several very clever people seem to be arguing over it, and it seems to be adding a printer. The .vbs in the other replys seems to be a reasonable alternative (and more understandable to me), but if I were able to add it to the GPO (how?) then surely this would effect people logging on outside the suite. The school is a JMI with only 16 computers in the suite, the startup folder is managable, but the better I do- the longer the tea breaks.
SteveBentley Posted June 8, 2007 Posted June 8, 2007 You can set a script to run on an OU containing the computer objects for the PCs in that suite rather than the user objects.
farmerste Posted June 8, 2007 Posted June 8, 2007 why not add the printers you need locally on the machine, that way they will always be available printers add new printer local printer- untick auto detection add new local port enter \\servername\sharename give it the drivers it requires and the printer now is a 'local' printer and all users will get it alternative use a default user profile and add the printers during the setup process ( this way is best if you are using printmanagerplus) hope this helps
MicrodigitUK Posted June 8, 2007 Posted June 8, 2007 I have a similar setup and I find it works really well. I use start-up batch file scripts setup so that the different groups in Active Directory install different printers at start-up by running the correct script for the room grouping. I also use two different drivers and mappings on the server to the same printer, one for mono and one for colour. For the mono I use the equivalent mono make of printers at the times driver. rundll32 printui.dll,PrintUIEntry /dl /n "HP Color LaserJet 3700 in D26" /q rundll32 printui.dll,PrintUIEntry /dl /n "HP B&W LaserJet 3700 in D26" /q rundll32 printui.dll,PrintUIEntry /u /if /b "HP Color LaserJet 3700 in D26" /f "\\jogdom.local\NETLOGON\InstallPrinters\Drivers\HP LJ 3700n\hpc3700c.inf" /r "\\JOGSERV01\hp3700n-002$" /m "HP Color LaserJet 3700 PCL 6" /q rundll32 printui.dll,PrintUIEntry /u /if /b "HP B&W LaserJet 3700 in D26" /f "\\jogdom.local\NETLOGON\InstallPrinters\Drivers\HP LJ 24x0\hpc24x0c.INF" /r "\\JOGSERV01\hp3700n-002BW$" /m "HP LaserJet 2420 PCL 6" /q rundll32 printui.dll,PrintUIEntry /y /n "HP B&W LaserJet 3700 in D26" /q The first 2 commands delete any existing copies of the printers if already installed the second 2 install the correct printers, network path and drivers. The last one as you know sets the mono as the default printer name for windows to use. p.s. Be warned that parts of the script are case sensitive as I found out the long way after days experimenting. I think it’s because the driver file printer name/description must be an exact match to find the driver in the *.INF file!!!!
RobFuller Posted June 8, 2007 Posted June 8, 2007 Don't know if you’re running R2 on your servers or not (I’m sure this tool was available for 'normal' versions as well) Printer Management MMC
wellwillthisnamedothen Posted June 8, 2007 Author Posted June 8, 2007 Thanks all This is getting like the No 84 bus, nothing for ages then lots together. Its going to take me a while to digest some of this, oh and I'm going to have to get an R2 disk.. and experiment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now