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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
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.
Answered 04/28/2007 by: jib
Purple Belt

Please log in to comment
0
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?
Answered 05/01/2007 by: danr29
Purple Belt

Please log in to comment
0
How about posting your sourcecode..? :P
Answered 07/16/2007 by: neo2000
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity