I have an odd customer requirement that they can be able to print from a desktop app to any printer on their network in any of their domains without a driver. I have this working; the problem that I am having is in retrieving a list of all the printers on the network. I have tried the API functions and I tried this code also.
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from Win32_Printer")
moReturn = moSearch.Get
Dim i = moSearch.Get.Count
Dim s = moSearch.ToString()
For Each mo In moReturn
Dim objReturn As Object
Dim test = mo("Name").ToString()
But I only get the printers registered to my machine.
Any help would be appreciated thank you.