Return Mapped Drives
How can I return the list of mapped drives? I would prefer not to have to create a text file on each machine if it's avoidable. I just don't understand why the RegistryValueReturn is failing on this registry path and value.
I know about the text file VB option, but thought I had below working at one time. It was a few Kace versions ago and I haven't used it in the interim so perhaps things have changed.
I don't see any related data on the machines I'm testing this on. See below for more info on that.
MAPPED DRIVE CIR EXAMPLE:
RegistryValueReturn(HKCU\Network\D,RemotePath,TEXT)
RegistryValueReturn(HKCU\Network\E,RemotePath,TEXT)
Below works. It shows up in all our machines as an Installed Program in the list on a machine's details page. It also shows up as the only entry under Custom Inventory Fields (1). We don't have any other "Custom Inventory" listings on our machines' details pages.
DISTINGUISHED NAME EXAMPLE:
RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine,Distinguished-Name,TEXT)
Answers (1)
Duh. Figured it out. Can only use one item in a rule.
Below works. So if I want to do it for every mapable letter, then I need 23 rules that will make the Machine Details page look messy. Phooey.
RegistryValueReturn(HKCU\Network\L,RemotePath,TEXT)
Comments:
-
Would "net use" have worked? - Jbr32 11 years ago
-
AND and OR should work in a custom inventory rule, so you might be able to combine a few of them. - jknox 11 years ago
-
That shouldn't return anything since the custom inventory rules run as SYSTEM and will not see HCKU. Your best bet is to run a script as the logged in user. Export the results as a .txt file, and then use a custom inventory rule to read that file. - dugullett 11 years ago