Solved

Get, Add and remove printers on network

Posted on 2003-11-19
7
265 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 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 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