?
Solved

network printers

Posted on 2005-04-05
7
Medium Priority
?
342 Views
Last Modified: 2013-12-07
Hi,

I am currently writting a "universal" logon script, which detects which gorup the user is in and sets up their stuff accordingly.. unlike my old method of writting
a script for each user.

Anyways, I want to start managing the network printers now by setting the shares using this script. However the printers here are not connected to a computer, but connected via ethernet to the network...

Is there a way I can still map these printers?

I have had a look at this zero admin resource kit.. and it says its for NT4.0 so does XP/win2k3 have the means to do this? If not, can I just copy the con2prt.exe file into the netlogon folder (like I did with the ifmember.exe file, according to M$ this will work).

I have also tried stuff like:
Net Use \\IPofPrinter
Net Use \\IPofPrinter\blah

which obvously didnt work

Cheers

~Binks
0
Comment
Question by:dr_binks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 15

Expert Comment

by:scampgb
ID: 13709827
Hi dr_binks,

If all you need to do is map the same printers for everyone, you can do this with a simple bit of VB script:

Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\myserver\myprinter","Test printer"

You can also do things like set printers depending on what groups they're a member of, but that gets much more complicated :-)
Does that help?


0
 
LVL 15

Expert Comment

by:scampgb
ID: 13709870
Sorry - I've just noticed that you did want to do it for specific group(s).

There's a useful thread at http://www.experts-exchange.com/Operating_Systems/Windows_Server_2003/Q_20975263.html#11005358 that contains some really useful example code.



0
 
LVL 5

Author Comment

by:dr_binks
ID: 13709898
heh, I was actually trying to avoid vbs.. I kindda just wanted to write this all in catch script, because I know what im doing
(except for when it comes to adding network printers :P )
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:dr_binks
ID: 13709922
*batch script
0
 
LVL 5

Author Comment

by:dr_binks
ID: 13710010
ok I managed to find a solution from

http://www.windowsitpro.com/Articles/Index.cfm?ArticleID=14539&DisplayTab=Article

I just tried this out in a script and it works:

rundll32 printui.dll,PrintUIEntry /if /b "HP LaserJet 4050 Series PCL" /f %windir%\inf\ntprint.inf /r "lpt1:" /m "HP LaserJet 4050 Series PCL"

im guessing there are two "LaserJet 4050 Series PCL", because one is the driver name (not the actual file name but the display name in the windows driver list) and
the other a a share name.

cheers anyways
0
 
LVL 15

Accepted Solution

by:
scampgb earned 1500 total points
ID: 13710072
*grin* you didn't say that you were using .BAT files - how quaint ;-)

Incidentally, you can find out a lot more info on PRINTUI.DLL at http://www.robvanderwoude.com/2kprintcontrol.html

You should post a message in Community_Support asking them to PAQ & refund this question.



0
 
LVL 5

Author Comment

by:dr_binks
ID: 13711740
well, I tell you what, I forgot to bookmark the link where I found this info from and it had all those switches for PRINTUI.DLL. So because you saved me half an hour of trying to find it again, I shall give you the points :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question