locked
UAG Custom registry key check RRS feed

  • Question

  • Hi all,

    I'm trying to get a test custom registry detection working on our UAG SP1 machine.  I've scoured technet and other sites for information on this and I'm nearly there but not quite.  Hopefully someone can spot where I've gone wrong.  As you can see it's for checking for a corporate machine.

    I have the "Detect.inc" file copied to the /von/InternalSite/inc/CustomUpdate/ folder

    Contents of detect.inc is;

     

    <%
    g_scriptList("/InternalSite/CustomUpdate/RegCheck.vbs") = false
    %>
    

     


    I have the RegCheck.vbs file copied to the /von/InternalSite/CustomUpdate/ folder

    Contents of  RegCheck.vbs  is;

     

    On Error Resume Next 
    
    'Gather the registry key information 
    bExist=Whale.Registry.RegKeyExist(rkHKEY_LOCAL_MACHINE,"SOFTWARE\TEST") 
    if Err=0 And bExist then 
    
      'Results command will create a session variable called IsACorporateMachine
      Results("IsACorporateMachine")=True 
    
      'This command will add a line in the client-side trace, if tracing is set to true. 
      Whale.DebugEcho "Key is there, this is a Corporate Machine" 
    else 
      Results("IsACorporateMachine")=False 
      Whale.DebugEcho "Key is NOT there, this is NOT a Corporate Machine"
    end if

     

    I have the the PolicyTemplate.xml file copied to the /von/conf/CustomUpdate/ folder

    Contents of PolicyTemplate.xml is;

     

    <Policies> 
     <Policy>
     <Name>Corporate Registry Entry</Name>
     <ID>IsACorporateMachine</ID>
     <Type>0</Type>
     <Value></Value>
     <Description>Corp Reg Key</Description>
     <Section>Variables\TEST</Section>
     </Policy>
    </Policies>
    

     

    I haven't changed any URL rule sets.  I didn't think I would have to.

    I saved and activated the configuration, closed the UAG console, re-opened it and modified the default "Corporate Machine" expression to use the new custom variable IsACorporateMachine.   I created the test registry key on a client and the variable doesn't appear to be queried properly, it's just being reported as False.



    Tuesday, July 19, 2011 11:39 AM

Answers

  • Aha, fixed it already.  I noticed when I pasted the VBS script here that it looked wrong.  I fixed the code syntax (I also edited to be correct above) and still it would not work.  I then renamed the Detect.inc file as TrunkName1detect.inc and now all works. :)   Maybe others will find the above useful since it does work fine.
    • Marked as answer by Erin Carter Tuesday, July 19, 2011 2:04 PM
    Tuesday, July 19, 2011 2:00 PM