Solved

Get, Add and remove printers on network

Posted on 2003-11-19
7
260 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now