/build/static/layout/Breadcrumb_cap_w.png

How could I setup a Custom inventory for this registry key?

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?


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: jknox 10 years ago
Red Belt
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.

 


Comments:
  • 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. - AFCUjstrick 10 years ago
Posted by: SMal.tmcc 10 years ago
Red Belt
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

 


Comments:
  • 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. :) - AFCUjstrick 10 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ