share printer from command line

fideba
fideba used Ask the Experts™
on
I urgently need a utility to share a local printer in NT4.  I know that in w2k it can be easily done with scripting, but this doesn't work in nt4.

any help is greatly appreciated
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
(of course, I'm looking for a command or scripting utility, not 'right-click your printer, ... :-)

Commented:
You can do this with prnAdmin.dll from the W2k Resource Kit. It's an ActiveX control, that provides the objects for scripting.
Sorry, I have no example available.

Commented:
btw: I'm sure you can use prnAdmin.dll on NT4 as well - else I wouldn't have suggested.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Author

Commented:
if I try to register prnadmin.dll (using regsvr32 prnadmin.dll) in nt4, I get an errormessage.  Have you ever tried this ?  I have to use in on a nt4 terminal server sp5.  Maybe sp6 ?

thx in advance

Commented:
Sorry, I never tried it - I'm new to scripting. On my workstation now I got an error as well - sp6a. I've searched the resource kits and I found no other tool. Maybe there is something on http://cwashington.netreach.net/ or http://www.scripthorizon.com/.
Why do you want to share printers on a terminal server?

Commented:
have u tried NET USE?

basically on the command prompt,
keyin NET USE \\<the machine name where the printer is physically connected or being shared>\<share name>

NET USE \\server1\hpdj

hope this helps

Commented:
DARKMOON, the question is about sharing from the commandline, not about connecting to a share (and net share only works for folders, not for printers - and so does rmtshare).
You should be able to do this using NET SHARE but I haven't done this before. I'll have a closer look if I have time - I'm working on a WIN95 machine at the mo - or you can experiment on your own. Take a look at NET HELP SHARE for more info.

Commented:
Net Share was my first thought. But since I've never shared a printer with commandline, I did as Blindside suggested - and there is no option to share printers.

Author

Commented:
I can't do this with net share.  Anyone has more success ?
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  Engineering has been advised of the error in the comment sort order, it is incorrectly sorting by userid.
This question appears to have been abandoned. A question regarding will be left in the Community Support area regarding its disposition; if you have any comment about the question, please leave it there.

The link to the Community Support area is:
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

DO NOT ACCEPT THIS COMMENT AS AN ANSWER.

Regards,

ep
Commented:
There is no definitive answer above and will move the question to PAQ.

ComTech
Community Support Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial