Banner for SMS deployments
Hi I am in the process of creating an HTA banner that is shown to the user for some of our application deployments through SMS. There's vbscript within the banner that needs to check for the existence of a registry value and also needs to enumerate subkeys under a certain key. I've tried to use the RegValueExist function to check for the existence of a registry value and this just gives me a 'type mismatch' error. I've also tried to use the EnumKey method to find subkeys under a key and this returns an empty value when echoed back. Does anyone out there have any scripts that sucessfully do one or the other (or maybe both?). I appreciate any help provided. Thank you.
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
jib
17 years ago
EnumKey is what I'd use. Sure your code is working? Does it work when you run it outside of the SMS process?
Rave posted some code a while back that could be used as a starting point.
Rave posted some code a while back that could be used as a starting point.
Posted by:
danr29
16 years ago
Yeah the EnumKey method normally works at least one level under the software key. What I'm trying to do is enumerate the key software\Microsoft\SMS\Mobile Client\Software Distribution\Execution History\System\(Package ID)\(Package GUID). EnumKey doesn't seem to work this deep into the registry and I need to use this because the key with the SMS Package ID has another key under it that's a randomly assigned GUID on each computer (and I need to write to values that are under this key). Should I maybe use ComSpec and use reg query then reg add? Is there a way to pass the value retured from reg query back to the vbscript?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.