-
1. Re: Custom Scan of a HKCU registry key
zman Mar 7, 2008 5:31 AM (in response to EMurphy15)Unfortunately this is not possible using the normal modifications to ldappl - maybe next version. The biggest hurdle is that when it is run under the local system account it will not see HKCU reg key. You could write a script to accomplish this.
-
2. Re: Custom Scan of a HKCU registry key
phoffmannMar 7, 2008 5:31 AM (in response to EMurphy15)
Your main problem is going to be user-context, really.
I would suggest moving your custom stuff to something like HKLM or so, as HKCU is just a plethora of headaches (and that's at the best of times - that would be advice from many hours of trying to come up with a way that'll make sure it'll work fine. The problem is because HKCU is very context sensitive, the amount of things that can go wrong with it (or "wrong" in terms of not picking up data you want) are legion.
Paul Hoffmann
LANDesk EMEA Technical Lead.
-
3. Re: Custom Scan of a HKCU registry key
EMurphy15 Mar 7, 2008 7:44 AM (in response to phoffmann)Thanks for clearing this matter up. I just needed to know if I was missing something.
Ed
-
4. Re: Custom Scan of a HKCU registry key
ingmeal Sep 22, 2008 9:58 PM (in response to EMurphy15)Try with this procedure: http://community.landesk.com/support/message/13481#13481
It worked for me.
-
5. Re: Custom Scan of a HKCU registry key
rsterling Oct 9, 2008 3:49 PM (in response to phoffmann)Here's what I did, but like you say. It's not so accurate because if the user is not logged in it still creates a lot of inaccuracies. Also, since it does work "enough to get a ball park figure", if anyone has any recommendations on how to streamline this VBS I would really appreciate it! I would like to add more HKCU's to copy to HKLM's in the future so I'm thinking maybe some type of an array?
Option Explicit
On Error Resume Next
Dim objShell, strRoot, strModify' Create the Shell object
Set objShell = CreateObject("WScript.Shell")strRoot = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"
strModify = objShell.RegRead(strRoot)
If Not IsEmpty(strModify) then
strRoot = "HKEY_LOCAL_MACHINE\Software\DCJS\LANDesk\Internet Settings\ProxyEnable"
strModify = objShell.RegWrite(strRoot ,strModify, "REG_SZ")
End IfstrRoot = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL"
strModify = objShell.RegRead(strRoot)
If Not IsEmpty(strModify) then
strRoot = "HKEY_LOCAL_MACHINE\Software\DCJS\LANDesk\Internet Settings\AutoConfigURL"
strModify = objShell.RegWrite(strRoot ,strModify, "REG_SZ")
End IfstrRoot = "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences\DoAging"
strModify = objShell.RegRead(strRoot)
If Not IsEmpty(strModify) then
strRoot = "HKEY_LOCAL_MACHINE\Software\DCJS\LANDesk\Office\11.0\Outlook\Preferences\DoAging"
strModify = objShell.RegWrite(strRoot ,strModify, "REG_DWORD")
End If
strRoot = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Preferences\DoAging"
strModify = objShell.RegRead(strRoot)
If Not IsEmpty(strModify) then
strRoot = "HKEY_LOCAL_MACHINE\Software\DCJS\LANDesk\Office\12.0\Outlook\Preferences\DoAging"
strModify = objShell.RegWrite(strRoot ,strModify, "REG_DWORD")
End If
objShell.Run """C:\Program Files\LANDesk\LDClient\LDISCN32.exe""" & "/NTT=pvwap02:5007 /S='pvwap02' /I=HTTP://pvwap02/ldlogon/ldappl3.ldz /NOUI /NOCD /F /SYNC", 0
strModify = null
WScript.Quit===========================================
Then in ldappl3, I check for:
;Outlook AutoArchive keys
KEY=HKLM,Software\DCJS\LANDesk\Office\11.0\Outlook\Preferences,DoAging,Email - AutoArchive
KEY=HKLM,Software\DCJS\LANDesk\Office\12.0\Outlook\Preferences,DoAging,Email - AutoArchive
KEY=HKLM,Software\DCJS\LANDesk\Office\11.0\Outlook\Preferences,DoAging,Custom Data - Email - 2003AutoArchive
KEY=HKLM,Software\DCJS\LANDesk\Office\12.0\Outlook\Preferences,DoAging,Custom Data - Email - 2007AutoArchive;MSIE
KEY=HKLM,Software\Microsoft\Internet Explorer,Version,Custom Data - Internet Explorer - Version
KEY=HKLM,SOFTWARE\DCJS\LANDesk\Internet Settings,AutoConfigURL,Custom Data - Internet Explorer - ProxyAddr
KEY=HKLM,Software\DCJS\LANDesk\Internet Settings,ProxyEnable,Custom Data - Internet Explorer - ProxyEnable=====================================
But - my REAL question on this matter... (I'm new!)
Lets say I ran this and it all worked well (which it has for the most part) and then later I decide I do not want my inventory in "Custom Data - Internet Explorer - Version", but I have all these values currently populated in the databse? How do I purge them?
Best regards,
Rich
-
6. Re: Custom Scan of a HKCU registry key
MarXtar Oct 9, 2008 4:59 PM (in response to rsterling)A good place to put these is into the registry section for LANDesk Custom Fields that way you don't have to update ladappl3.template each time, don't write the entire key into the software section, just give your registry key a descriptive name and populate the value just like the IE version you mention at the end of your post.
If you change your mind later, you need to get rid of the keys themselves on the machines so they won't scan back in (if you use the ld custom fields option) or simply remove the ldappl3.template entry if you don't. Once that is done you need to delete the unmodeled data in the database and you can do this using LANDesk's DBRepair utility that you can get from LANDesk support. This will show you unodeled data and you can purge it form the DB - normally used to get rid of corruptions.
Mark Star - MarXtar LANDesk Enhancements
Home of Power State Notifier & Wake-On-WAN for LANDesk
-
7. Re: Custom Scan of a HKCU registry key
puercomal Oct 9, 2008 7:02 PM (in response to rsterling)You'd be a lot better off using ldms_client, IMHO.