Link to home
Start Free TrialLog in
Avatar of tfountain
tfountain

asked on

how do you add network printers to all users in xp (roaming profiles)

how do you add network printers for all user profiles in xp. Ive already tried adding though reg. Also tried the "microsoft" answer by writing a script and this added one printer but not all.
Avatar of gemarti
gemarti
Flag of United States of America image

You can modify the Default User's NTUSER.DAT file. Then when ever a new user logs onto the machine the printers get set up automatically.

I'll post more in a few.
Avatar of tfountain
tfountain

ASKER

Ive already done this and it only loads 1 printer I have sevaral that need to be installed.  When you are adding the reg keys to the ntuser.dat files are you hand loading or creating a new hive, then saving to the ntuser.dat.
Sitting at the local machine:
In Windows Explorer goto TOOLS | FOLDER OPTIONS
Select the VIEW TAB
Click "Show hidden Files and Folders"
Remove check from "Hide extenstions for know file types"
Now
Click START | RUN | REGEDIT
Click on HKEY_USERS (so that it is active)
On the Regedit menu select FILE | Load Hive
Browse to the user's C:\Documents and Settings\Username\ntuser.dat Or the Default User's ntUser.dat file if it's a new image
Click OK

Now you have a hive under HKEY_USERS called "default"  NOT ".DEFAULT" there is a difference (notice the period in front of ".DEFAULT"!

Here is the format I use to add network printers. You'll have to modify for your circumstances:

+++++++++Cut below this line++++++++++++++++++++++++++++++++++++++++++++

Windows Registry Editor Version 5.00

[HKEY_USERS\Default\Printers\Connections]

[HKEY_USERS\Default\Printers\Connections\,,ServerName,PrinterName1 Printer Model]
"Server"="\\\\Servername"
"Provider"="win32spl.dll"


[HKEY_USERS\Default\Printers\Connections\,,ServerName,PrinterName2 Printer Model]
"Server"="\\\\ServerName"
"Provider"="win32spl.dll"

[HKEY_USERS\Default\Printers\DevModePerUser]

[HKEY_USERS\Default\Printers\DevModes2]

[HKEY_USERS\Default\Printers\Settings]

[HKEY_USERS\Default\Printers\Settings\Wizard]
"Test Page"=dword:00000001
"From Web"=dword:00000000
"Use Existing"=dword:00000000
"Set As Default"=dword:00000000
"Driver Name"=""
"Local Printer"=dword:00000001
"Shared"=dword:00000000
"Additional Drivers"=dword:00000001
"PnP Autodetect"=dword:00000001

+++++++++++++Cut above this line save as a dot reg file that's .reg  by pasting into notebook+++++++++++++
++++++++++++++Change the names of the Server and printer (See the .reg file)+++++++++++++++++++
++++++When finished double click the .reg file+++++++++++++++++

You'll be told that your about the modify the registry.
You'll be tole that the registry was sucessfully modified.
Now click on the default key and the select FILE | EXPORT HIVE

ASKER CERTIFIED SOLUTION
Avatar of gemarti
gemarti
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oBdA
No registry manipulation necessary; Mapping printers is a classical job for a logon script.
You can use, for example, con2prt.exe (from the Zero Administration Kit):

con2prt.exe /c \\printserver\share
("/cd \\printserver\share" to install it as default printer, /f to delete all existing connections)

How to Use Con2prt.exe to Connect to a Network Printer
http://support.microsoft.com/?kbid=181663

Zero Administration Kit
http://www.microsoft.com/ntworkstation/downloads/Recommended/Featured/NTZAK.asp

Instead of con2prt, on W2k and XP you can use rundll32 as well:
rundll32 printui.dll,PrintUIEntry /in /n \\printserver\share

to delete a connection:
rundll32 printui.dll,PrintUIEntry /dn /n <printer name>

Enter rundll32 printui.dll,PrintUIEntry /? for a list of possible switches; note that PrintUIEntry is case sensitive.

If you want to map printers according to group membership, you can use ifmember.exe from the resource kit.
http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp

ifmember.exe YourDomain\SomeGroup
if not errorlevel 1 goto EndSomeGroup
con2prt.exe /c \\printserver\SomeGroupPrinter01
con2prt.exe /c \\printserver\SomeGroupPrinter02
:EndSomeGroup
Its all registry manipulation. :)
Your just putting a script between the administrator and the registry.
I'm more of a hands on type so I go directly to the registry. :)

Good post though.
Yes well, Group Policies are registry manipulations, too ;)
On a personal machine, I don't mind registry manipulations either; but the "hands on" approach is doomed to fail in a real network sooner or later. Scripts are a lot easier to maintain then registry files.
You could also logon as the local administrator on a machine.. go to your printer settings at a printer create a new port choose to create a new local tcp/ip port enter the ip information for the printer and select te right drivers etc.. and there you have a local printer wich can be seen by everyone who logs onto the Windows XP. This might come in handy when you have a policy set that define that  users can't install printers.


Ralf
gemarti

In the reg file you enter in the printer model information.

I was just wondering what information is this and what will be accepted, numbers, words, a combo?

Thanks
Chris