query for specific registry key
hi all, could someone,help me on how to query sms DB about specific registry key. i need to create collection based on this query: all machines that have on the HKLM\software\microsoft\sms\mobile client\software distribution\execution history\system path a specific package ID entry.
February 13th, 2011 9:41am

hi, I don't think it's possible to create that kind of Collection, what exactly do you need to find on those machines?MCSA | MCTS - SCCM 2007
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2011 9:51am

Hi George, thanks for your quick reply. I need to report all machines that have that registry key. regards.
February 13th, 2011 9:57am

Hi, You have two options 1) Extend the inventory files (sms_def.mof and configuration.mof), an exemple is provided here - http://blog.coretech.dk/kea/how-to-get-registry-information-into-hardware-inventory/ 2) You can use the DCM feature to create a registry rule for the specific package id. All clients with the package id wil be listed as compliant. an example is provided here - http://blog.coretech.dk/kea/using-software-distribution-and-desired-configuration-management-to-fix-non-compliant-computers/Kent Agerlund | My blogs: http://blog.coretech.dk/author/kea/ and http://scug.dk/ | Twitter @Agerlund | Linkedin: /kentagerlund
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2011 9:59am

Kent, Extending the inventory is a good idea ;) Thanks for useful linkMCSA | MCTS - SCCM 2007
February 13th, 2011 10:03am

There might be a 3<sup>rd</sup> option. That key is going to tell you what you have executed but that status messages within ConfigMgr might be able to tell you the same thing too. What are you trying to do? http://www.enhansoft.com/
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2011 11:06am

Jones, what is this option you are talking about.could you explain me please. thx
February 13th, 2011 12:08pm

All Advertisement details are returned to ConfigMgr, for example who install what, what is the last status message of the advert, etc.. What are you trying to do? With this information, we can better understand how to help you.http://www.enhansoft.com/
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2011 12:25pm

I want to deploy an sms package on all my domain clients. After trying on some test machines,i discover that some clients have that registry key,witch will prevent my sms package to be deployed succefuly. So,i want to report all my domain machines where this key is installed,in order to fix this issue. many thx in advance for all.
February 13th, 2011 1:45pm

Here's a thought. That particular registry key, for that particular package within that key, simply means that the package has already been attempted to install, (possibly unsuccessfully) in the past. Instead of doing a hardware inventory or DCM to check that key, for the Advertisement itself, try changing the 'rerun' choice to "Always Rerun". Additionally, you may (you may not, it depends upon the original advertisement settings) but you perhaps may need to set the mandatory start time to be a recurring, like "run every 7 days", or you need to add a 2nd mandatory start time to the list of start times within the advertisement. By modifying the rerun and mandatory start times, regardless of whether that regkey is set or not, the Advertisement properties of "rerun always" + the run times will mean that even if the regkey exists, the client will re-run the advertisement. ------------ Additionally, this may not apply to your situation, but if your end goal is to re-run the advertisement only on machines which have previously failed, here's way to build a collection of only those machines. And that is the collection you target with the now modified advertisement with additional mandatory times + rerun always: http://eskonr.com/2010/01/collection-based-on-advertisement-status/ Standardize. Simplify. Automate.
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2011 2:29pm

Yes, I think Sherry is on the right track here. The re-run setting should do what you need without having to inventory every PC.http://www.enhansoft.com/
February 13th, 2011 4:50pm

sorry all, i think that i'm not explaining my need. in my domain,some clients have that key installed,for others not.so,before deplying my sms package,i want to report all machines with that key (witch prevent my package to be installed succefully) in order to limit my software distribution. sorry again.
Free Windows Admin Tool Kit Click here and download it now
February 14th, 2011 3:03am

Hello - I think, the best way is to create Conguration Item through DCM to find out the registry key. More details about CI Kent's http://blog.coretech.dk/kea/using-software-distribution-and-desired-configuration-management-to-fix-non-compliant-computers/ Also see, technet article, http://technet.microsoft.com/en-us/library/bb694136.aspxAnoop C Nair
February 14th, 2011 3:08am

That registry key will list the packages installed on a PC, right? You want a list of PCs with a particular registry key, for example, HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\SMS\Mobile Client\Software Distribution\Execution History\System\ES100037, Right? I know that you want to install a package but how does inventorying that registry key help you? What are you going to do when you find PCs with that key? Delete the registry key? http://www.enhansoft.com/
Free Windows Admin Tool Kit Click here and download it now
February 14th, 2011 6:21am

"i think that i'm not explaining my need. in my domain,some clients have that key installed,for others not.so,before deplying my sms package,i want to report all machines with that key (witch prevent my package to be installed succefully) in order to limit my software distribution." I believe Garth & I understand your situation. And inventorying (or doing a DCM compliant check) for that regkey will not help in the long run. Because... think of it this way: 1) you inventory or dcm check for that regkey. 2) You use the results to create a collection to send out an advertisement to reg delete that key. 3) The computers you want to re-run the package, "somehow" you get them to rerun the package. 4) Those exact same computers now get that exact same package... and now that regkey exists again. Which will again be inventoried or dcm checked to exist again. Do you see the endless loop? Having that regkey about package execution history, and inventorying for it, will turn into you endless chasing your tail. Unless there is something really, really wrong with your package, like you repackaged it in some horrible way that relies on that regkey...(I cannot think of how you might have done so, but wackier things have happened) deleting the regkey is not the answer.Standardize. Simplify. Automate.
February 14th, 2011 7:13am

Extend hardware inventory as Kent indicated. Then you can create a query-based collection that will contain only the systems that have the registry key.Romano Jerez | http://NETvNext.com
Free Windows Admin Tool Kit Click here and download it now
February 14th, 2011 12:08pm

I absolutely adore custom hardware inventory. And am in love with DCM for everything under the sun. So, that said… if *I’m* saying that hardware inventory and dcm is the absolutely wrong answer here… if you choose to go ahead and do a custom hinv or dcm CI… well, good luck to you. I think it’s the absolutely wrong answer for this situation.Standardize. Simplify. Automate.
February 14th, 2011 2:59pm

The problem is my package will be installed succefully when a machine doesn't have this key. So,what i want to do is just create a collection that contain all machines without that key and deploy my sms package,it's like limit my deploy to a sub set of machines. any suggestions. Regards.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 3:30am

The problem is my package will be installed succefully when a machine doesn't have this key. What's the reason for that? Is the package checking for the registry key itself or are there any conflicts when other software is installed? What happens if you try to install the software and the regkey is present?Torsten Meringer | http://www.mssccmfaq.de
February 16th, 2011 3:45am

that's right,there is a conflict with an old installed software,when i try to install the package and the regkey is present,i got a failed install message.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 4:08am

Look at Program Rerun behavior setting on an advertisement http://technet.microsoft.com/en-ca/library/bb694016.aspx Program rerun behavior Specifies whether the advertised program will be rerun on the client computer if it has previously been run before the scheduled mandatory time. Always rerun program: The program will always be rerun on the client when the advertisement is scheduled, even if the program has already been successfully run. This is particularly useful when using recurring advertisements in which the program is routinely updated, as with some virus detection software.http://www.enhansoft.com/
February 16th, 2011 6:45am

Please, for us... can't you just *try* setting the advertisement to target a collection of computers which currently 'fail' if the regkey is present, modify the adveritsement to "rerun always", and add another mandatory start time? Please?Standardize. Simplify. Automate.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 6:49am

that's right,there is a conflict with an old installed software,when i try to install the package and the regkey is present,i got a failed install message. You could also use a tasksequence to install the softwarae (yes, even outside OSD). Just add a condition that the install will be skipped if that registry key (or even better: the software) is present. Or: create a new collection that excludes all computers where the conflicting software is installed on (given that it registers itself in add/remove programs or another location that's inventoried by default). Torsten Meringer | http://www.mssccmfaq.de
February 16th, 2011 8:06am

I'm beginning to think, perhaps, that they have "run another program first", for an old package, and they need to check the box to always rerun the parent package, when the end of the chain of package installs is the advertisement target. But... everything here is a guess. Because we don't know what he is installing, or what the error message is. Just that it fails. What exactly are you installing? How many steps? Is it something packaged internally? or installed via a custom script wrapper or cmd? A Task Sequence? 1 program? or several programs using "run another program first"? I think the problem (for me), is they are having an issue with a registry key that should mean absolutely nothing to the ability for something to reinstall successfully. It makes zero sense that the presence or absence of any regkey in that location interferes with an install. So something within the chain of events you have defined must be 'off'.Standardize. Simplify. Automate.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 8:58am

i think he just want to know which machine has the registry key, and then clean the registry before installing the software whatever it is, its nice to know there's a lot of what SCCM is capable of as discussed here---Packie
February 16th, 2011 5:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics