Solved

Get, Add and remove printers on network

Posted on 2003-11-19
7
261 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now