Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Connected Persistent Network Printers wntResources2
My problem is that I am attempting to read the users "persistent network printers." I don't want to know what printers they are temporarily using. Another problem is that we have 20 domains. No one is in the same domain at every sight. All domains are available from all sights. WAIT! It gets worse. There is not just one print server per domain, there could be an additional 20 print servers on any domain. It gets worse as the company grows as there is no focus on IS cooperation.
What I would like to do is generate a list of all printers the user is connected to on the network. I have tried the wntResources and wntResources2 functions. Both work great when viewing all printers in a specific domain and specific printer server. I have tried the following command:
printers = wntResources2("", 1, 2, 3, "")I am given a blank dialog box listing no connections.
I am running both Windows 95 and Windows NT PCs on a WinNT network. Any ideas?
One last time, thanks SO MUCH for a great LIFE-SAVING product. I feel that I am at cause over my PC, not an effect of my PC. You're Tech Support is wonderful and I can't ever stop bragging about my new found abilities from your product. Hey, people are calling me "The WinBatch Man." Got any T-shirts I could wear? :)
HKCU\Software\Microsoft\WindowsNT\Current Version\PrinterPorts\contains a list of Printer UNCs used,
HKCU\Software\Microsoft\Windows NT\Current Version\Network\Persistent Connections\contains a list of share UNCs. The path for 95 is similar.
NB: To see non-persistent Printers connected and what system and printer name it is, you might be able to poke around in the win.ini file to see that it says in the printer section. And/or DiskScan will tell you the network drives connected. Process that in a for loop (using ItemCount and itemExtract) to pull each drive out one at a time, and feed the drive to the wntGetCon function to see what it is mapped to.
Article ID: W13704
Filename: Seeing Persistent Network Printers.txt
File Created: 1999:04:15:16:55:48
Last Updated: 1999:04:15:16:55:48