Welcome to the Blogcast Repository Sign in | Join | Help
Search BlogCastRepository.com for:
in Search

254 BlogCasts in The BlogCast Repository!

Query for a Registry key

Last post 01-11-2008 4:19 AM by Abhishek Joshi. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-10-2008 3:14 PM

    • sms_chile
    • Top 100 Contributor
    • Joined on 12-17-2007
    • Posts 9
    • Points 150

    Query for a Registry key

    Hi

    its me again with my imposible questions....i asking if could make a query of a workstations, that a have a particular key in the registry, its that posible?  or not?...thanks for you support..

    greetings from Chile...

    Miguel Villamor
    Windows Consultor
    http://www.interspace.cl
    • Post Points: 20
  • 01-10-2008 3:45 PM In reply to

    • gatorcb
    • Top 500 Contributor
    • Joined on 10-30-2007
    • Posts 2
    • Points 40

    Re: Query for a Registry key

    you could have a batch file that did a reg query.  If there the key exists, spit out the computernametrue.txt otherwise computernamefalse.txt to a shared folder
    • Post Points: 20
  • 01-11-2008 1:45 AM In reply to

    Re: Query for a Registry key

    Nope it can not be possible through SMS query.

     But if you want that SMS should inventory registry data then it can be possible by 2 ways..

    1) Modify SMSdef.mof file or

    2) Create the script which will create the text file inside a folder within the system and name of the file will be the same as the registry key data. for exa.if you want to extract version name of of Google updater then create the vb script which will create text file inside the c:\googleupdate folder with the name Googleupdate_<version number> . <version number> will be different in each system.You have to create googleupdate folder by the vb script too.

    And then you can inventory these text file from c:\googleupdate folder by adding into the software inventory client agent. and then you can easily extract data from SMS query.


     

     

    Thanks and Regards
    Abhishek Joshi | SMS 2003/SCCM2007 certified,ITIL Foundation
    http://blogcastrepository.com/blogs/abi/default.aspx
    Filed under: ,
    • Post Points: 5
  • 01-11-2008 4:19 AM In reply to

    Re: Query for a Registry key

    If you want to modify SMSdef.mof  then please see exa below

     

    //------------------------------------------------------
    // Identifying Servers running TS in Application Mode
    // Terminal Services- Obtain TSEnabled from Registry
    // Terminal Services- Obtain TSAppCompat from Registry
    //------------------------------------------------------

    #pragma namespace (“\\\\.\\root\\cimv2”)
    // grab the TS Enabled and TS Application Mode
    [DYNPROPS]
    class TSAPPMode
    {
       [key]
        string keyname=””;
        string TSEnabled;
        string TSAppCompat;
    };
    [DYNPROPS]
    instance of TSAPPMode
    {
        keyname=”TSAPPMode”;

        [PropertyContext(“local|HKEY_LOCAL_MACHINE
        \\SYSTEM\\CurrentControlSet\\Control
        \\Terminal Server|TSEnabled”),Dynamic,
    Provider(“RegPropProv”)]
        TSEnabled;

        [PropertyContext(“local|HKEY_LOCAL_MACHINE
        \\SYSTEM\\CurrentControlSet\\Control
        \\Terminal Server|TSAppCompat”),Dynamic,
    Provider(“RegPropProv”)]
        TSAppCompat;

    };
    #pragma namespace (“\\\\.\\root\\cimv2\\sms”)
    [

        SMS_Report(TRUE),
        SMS_Group_Name(“TS Application Mode”),
        SMS_Class_ID(“MICROSOFT|TSAPPMode|1.0”)
    ]
    class TSAPPMode : SMS_Class_Template
    {

        [SMS_Report(TRUE),key]
        string keyname;
        [SMS_Report(TRUE)]
        string TSEnabled;
        [SMS_Report(TRUE)]
        string TSAppCompat;
    };

     refer following link

    http://www.microsoft.com/technet/solutionaccelerators/cits/mo/swdist/pmsms/2003/pusmscg4.mspx 

     

    Thanks and Regards
    Abhishek Joshi | SMS 2003/SCCM2007 certified,ITIL Foundation
    http://blogcastrepository.com/blogs/abi/default.aspx
    Filed under:
    • Post Points: 5
Page 1 of 1 (4 items)