I'm wanting to find out how many machines have printers that are mapped from our old print server.

I've found this in the registry:

[HKEY_CURRENT_USER\Printers\Connections\,,print,Accounting]
"Server"="\\\\print"

[HKEY_CURRENT_USER\Printers\Connections\,,print,Admin]
"Server"="\\\\print"

As you can see these are two seperate printers that are mapped to my computer from the server \\print

How could I use custom inventory to find computers that have printers mapped from the print server using information from these registry keys?

I don't think there is a "Registry key contains" inventory so how could I do this?

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1

You might be able to use a custom inventory rule to get the data you are looking for.

RegistryValueReturn(registryPath, name, type)

I don't remember if you can read a user key or not.  I think not because the agent doesn't normally have access to the user account.  If that's the case, you could run a batch file to read the key and create a file.  Then use a custom inventory rule to get the info into the K1000.

 

Answered 01/13/2014 by: jknox
Red Belt

  • My brain too me down the Shellcommandtextreturn route to try pull all the keys in the connections folder then do an advanced search to pull all of them that have ,,print or something like that in them.
    Only problem is I'm not having much luck getting the shellcommand to work properly.
Please log in to comment

Answers

0

Since printers are a per user thing you need to do a script to create a file then read that file as a custom inventory.

You can either export that part of the registry to file using a script or run a wmic command like:

wmic printer get name,servername > $(KACE_INSTALL)\printer.txt

 

Answered 01/14/2014 by: SMal.tmcc
Red Belt

  • Well my brilliant self discovered that I already had a list of printers in the custom inventory. Because there are so few that have the print server connected printer it didn't occur to me that I could just search through what I had already made.
    Thank you SMal for pointing out my stupidity gently. :)
Please log in to comment
Answer this question or Comment on this question for clarity