0

Greetings All! I am working on a java project where I am suppose to get shared printers in windows, I have a shared/networked printer:

enter image description here

as you can see in above picture i have highlighted shared Icon. I have tried powershell and wmic (using command line) in both cases i get Shared = False and Network = False. I am mostly java guy so just wondering if there are any suggestions please. here is response for:

wmic printer get name,shared,servername,SystemName,ShareName,PortName,network,local

enter image description here

Kind Regards FI

Sajid
  • 379
  • 4
  • 18
  • When the printer is a network printer then the shared state should be returned as true by following command `wmic printer get name,shared,servername`. – SubOptimal Jun 15 '17 at 11:39
  • as mentioned above it returns shared = False – Sajid Jun 15 '17 at 12:58
  • That sounds strange. Could you share the output of `wmic printer get name,shared,servername,SystemName,ShareName,PortName,network,local`. – SubOptimal Jun 16 '17 at 07:31
  • thanks for your reply @SubOptimal, I have edited the question and placed image there as output for above – Sajid Jun 16 '17 at 21:03
  • This shows the printer is not connected to a shared network printer, but rather to via [WSD](https://en.wikipedia.org/wiki/Web_Services_for_Devices). That's why `Shared/Network` shown as false. Maybe the column `PrintProcessor` could be used to identify such port. – SubOptimal Jun 19 '17 at 10:39

0 Answers0