I want to be able to add a list of all the GPOs applied to a computer object into inventory so I can query for computers that are missing a desired GPO or computers that have a particular GPO applied to them. I've been struggling with using LDSCNHLP.INI to execute gpresult.exe and am tempted to try going the route of adding the data to the registry and then using the ldappl3.template to harvest the data from there. It seems like that is an inferior route since I still need a seperate process to put the data into the registry and it wouldn't be as dynamic since I'd have to rerun that process to refresh the registry values.
I'm curious if anyone has experience with using LDSCNHLP.INI to perform this sort of activity.
So far, I've got the following added to my LDSCNHLP.INI file:
[EXECUTE WIN16]
[EXECUTE WIN32]
LAUNCH1=c:\windows\system32\gpresult.exe /SCOPE COMPUTER > C:\PROGRA~2\LANDesk\LDClient\gpos.txt
[DATA FILES]
DATA1=C:\PROGRA~2\LANDesk\LDClient\LDCUSTOM.DAT
DATA2=C:\PROGRA~2\LANDesk\LDClient\gpos.txt
My intent is to capture the output from gpresult and send it to gpos.txt, then have that data added to inventory. I'm running inventory scan with a /o to send my scan results to a text file I can review so I know it's not a matter of the data being blocked. When I run inventory scan (as admin so I get gpresult running as admin to gather the computer data) I see the hardware section indicate that it's "running custom scanners" and I do see a terminal box pop up for a moment but I don't see gpresult running in the task manager. It proceeds through the rest of the scan and I see output that is the same as any without these entries in LDSCNHLP.INI.
I don't think I'm actually running gpresult and I'm curious if I add it to a batch file with the switches, if maybe the switches are messing it up. I'm also concerned about the formatting of the output but until I'm getting output I'm not ready to address that worry.
Any guidance on doing this?
Thanks
Bryan