Solved

Get, Add and remove printers on network

Posted on 2003-11-19
7
263 Views
Last Modified: 2010-05-01
Hello,

I have a problem on VB. I would like to get all printers throught my network, include printers attached on network, removes and adds them and get properties.

E.g. : on one workstation (NT4), I want to get network printer, remove driver and add another drivers on remote.

Is it possible and how ?

Thanks by advance.
0
Comment
Question by:esohier
  • 4
  • 3
7 Comments
 

Author Comment

by:esohier
ID: 9785421
May be more difficult ?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 200 total points
ID: 9787340
There is the Window Scripting Host.  You can access it in your VB6 program, by adding a reference to wshom.ocx, which is normally in the System folder for your operating system.  Look at the WshNetwork class.  It has methods to enumerate, add, and remove printers.
0
 

Author Comment

by:esohier
ID: 9787449
Where can I found this file ?

I've already install the wmicore and scr56en.exe files, but, I don't see the class.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 9787458
For me, wshom.ocx is in C:\Windows\System32 (XP).
0
 

Author Comment

by:esohier
ID: 9787502
That's Ok.

Where can I found methods and properties of this object (web site ?) ?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9787542
RTF Document:  Using the Windows Scripting Host Without Scripting
http://www.vbug.co.uk/magazine/2001/download/UsingWSH.doc
0
 

Author Comment

by:esohier
ID: 9787557
Thanks.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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