PC Review


Reply
Thread Tools Rate Thread

detect all printers in networks

 
 
zz
Guest
Posts: n/a
 
      12th Jan 2007
Is it possible to detect all active printers in a network directory?, i need to display them all in a listview control in a userform, this is the first time i'm attempting to do this so i don't know how it could be done.


--
--
---
ZZ [underground]
Semi-musico,cuasi-poeta y loco
 
Reply With Quote
 
 
 
 
zz
Guest
Posts: n/a
 
      12th Jan 2007
great!!

easier than i thougth , but i'm not sure i understand it


dissectioning

first: a reference to ("wscript.network"), i'm assuming it is the local
computer's network configuration we're reading here?

second : the EnumPrinterConnections method/function returns an array
containing all the printers connected to 'this' computer, since it only
retrieves the Printers installed on 'this' machine [there are thousands
of printers in the server's directory].

third : you loop trough all items in the array, which are actually
objects? of the type printer?

so, the printer.item( i ) actually retrieves the port to wich printer
is connected/assigned and then the name of the printer would be
printer.item(i+1)?



i wonder if this could be done to read all printers available for install in
the server's directory


thanks a lot.


--
--
---
ZZ [underground]
Semi-musico,cuasi-poeta y loco


"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:53589CA3-B9CB-459D-BD4F-(E-Mail Removed)...
> Sub a()
> Set WshNetwork = CreateObject("WScript.Network")
> ' Set oDrives = WshNetwork.EnumNetworkDrives
> Set oPrinters = WshNetwork.EnumPrinterConnections
> For i = 0 To oPrinters.Count - 1 Step 2
> Debug.Print "Port " & oPrinters.Item(i) & " = " & _
> oPrinters.Item(i + 1)
> Next
> End Sub
>
>
> perhaps.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "zz" wrote:
>
>> Is it possible to detect all active printers in a network directory?, i
>> need to display them all in a listview control in a userform, this is the
>> first time i'm attempting to do this so i don't know how it could be
>> done.
>>
>>
>> --
>> --
>> ---
>> ZZ [underground]
>> Semi-musico,cuasi-poeta y loco



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
D-link DWL 650+ doesn't detect networks Allie Windows XP Networking 15 18th Oct 2008 11:56 AM
D-link DWL 650+ doesn't detect networks Allie Windows XP Networking 1 1st Aug 2008 01:41 AM
How do I detect networks programatically? jim Microsoft VB .NET 4 4th Jul 2007 02:06 AM
Detect WiFi Networks =?Utf-8?B?VGFydW4=?= Microsoft VB .NET 4 10th Oct 2006 05:44 AM
Printers on Networks Chrometix Windows XP Print / Fax 4 15th Mar 2004 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 AM.