?
Solved

Get, Add and remove printers on network

Posted on 2003-11-19
7
Medium Priority
?
266 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
[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
 

Author Comment

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

Accepted Solution

by:
Bob Learned earned 800 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
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 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

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 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