Re: Add printer to all users?

Tech-Archive recommends: Fix windows errors by optimizing your registry



A batch file can add printers to the computer in HKLM, that puts it in for
all users.
------------sample file begin------------
rundll32 printui.dll,PrintUIEntry /ga /n\\printserver\printershare /j"LanMan
Print Services"
sc stop spooler
sc start spooler
------------sample batch file ends------
The entry - "/ga" is best thought of as "Global Add" - to remove the
printer, change to "/gd" - "Global Delete"
Once added, you cannot delete the printer through the control panel - run
the batch file again, changing the line to read /gd first.
This could be run from a vb script, or otherwise. You will need to be at
least a "Power User", if not an Administrator.

Randy Reimers

"TimM" <TimM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CBBF5F16-9747-4493-A545-8BC59EA62E90@xxxxxxxxxxxxxxxx
Is it possible to add a printer to all users. I have bene trying to work
out
a script that will install based on group membership but has becom a
daunting
task. So I'm also toying with the notion of installing printer from the
admin
account when I set up the users PC but the only problem is that network
printers are user based. Can you install a network printer from one
account
and have it show up on all the users accounts that login to the PC?

My script at least for now to install printers is:
Option Explicit
Dim strOption, objNetwork, strTitle

strTitle = "Printer Install"
StrOption = Inputbox ("Select Printer Desired", strTitle)
If strOption = 1 Then
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.AddWindowsPrinterConnection "\\servername\printer"
objNetwork.SetDefaultPrinter "\\servername\printer"
End If
If strOption = 2 Then
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.AddWindowsPrinterConnection "\\servername\printer2"
objNetwork.SetDefaultPrinter "\\servername\printer2"
End If

Also on a side note, how do you make multiple lines in a message box or a
input box? I know in HTML it's as easy as <br> to insert a line break.

Thanks a million.

--
Thanks
TimM


.



Relevant Pages

  • Re: Spooler Subsystem App closed by Data Execution Prevention
    ... Windows Printing Team ... needed), typed "net start spooler" at the command prompt, and tried to add ... same date as an installer file, HpTcpMon.msi, in the install ... I get the messages "The Print Spooler service is ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Printers won´t install
    ... itself and is part of the spooler software ... It is found in the Windows dorectory, ... When I start isntalling drivers by pressing add printer, ... I tryed other XPx64 cd and it didthe same thing, during clean new install ...
    (microsoft.public.windowsxp.print_fax)
  • Re: batch file wont run
    ... Re-run the adv with "Allow user to ... It should install correctly and should try to copy. ... it fails with the batch file it will pause so you can see the dos error. ... default ini file on the clients workstation. ...
    (microsoft.public.sms.setup)
  • Re: Software Rollout
    ... I edit that batch file all the time to map domain ... wide drive letters to shares on the server. ... it installed outlook. ... If something did not install then just do the ...
    (microsoft.public.windows.server.sbs)
  • Re: User Management
    ... you - and your manager - and install it in one fell swoop. ... create one for Remote Desktop access, too - in this case, RDaccess ... Copy the batch file you created to the clipboard, ... All the computers in this OU should have the startup script applied ...
    (microsoft.public.windows.server.sbs)