[gptalk] Re: Registry Logic Statement

  • From: Jeremy Saunders <jeremy.saunders@xxxxxxxxxxx>
  • To: gptalk@xxxxxxxxxxxxx
  • Date: Fri, 1 Dec 2006 16:01:41 +0800

Yep, that's how I would do it...or if you want it in a VBScript, then use
the RegRead function.

--------------------------------------------------
strRegKey = "HKCU\Environment\"
strValue= "Temp"
Set objShell = CreateObject("WScript.Shell")
strValueData = objShell.RegRead(strRegKey & strValue)
Wscript.Echo "The TEMP environment variable is set to: " & strValueData
--------------------------------------------------

Cheers.

 Kind regards,

 Jeremy Saunders
 Senior Technical Specialist

 Infrastructure Technology Services
 (ITS) & Cerulean
 Global Technology Services (GTS)
 IBM Australia
 Level 2, 1060 Hay Street
 West Perth  WA  6005

 Visit us at
 http://www.ibm.com/services/au/its

 P:  +61 8 9261 8412                F:  +61 8 9261 8486
 M:  TBA                            E-mail:
                                    jeremy.saunders@xxxxxxxxxxx










                                                                       
             "Jeremy Waldrop"                                          
             <jwaldrop@cookcon                                         
             sultingservices.c                                          To
             om>                       <gptalk@xxxxxxxxxxxxx>          
             Sent by:                                                   cc
             gptalk-bounce@fre                                         
             elists.org                                            Subject
                                       [gptalk] Re: Registry Logic     
                                       Statement                       
             01/12/2006 07:27                                          
             AM                                                        
                                                                       
                                                                       
             Please respond to                                         
             gptalk@freelists.                                         
                    org                                                
                                                                       
                                                                       




Use reg.exe with the query command.

Reg query

-----Original Message-----
From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx]
On Behalf Of dcnash@xxxxxxxxxxxxx
Sent: Thursday, November 30, 2006 4:28 PM
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] Registry Logic Statement

Does anyone know of a way to create a logic statement that checks the
presence of a value in the registry?
My goal is to check a specific value in the registry, if the value is
there, do nothing. If its not there then run a program to add the entry.
Ive tried to create an adm to solve this issue, but the value is a
binary value. To my knowledge you cant write a binary value to the
registry using .adm files. Any ideas would be appreciated! BTW I found a
VBScript that does what I need it to do, however it creates an error if
the value is already present, I need it to be invisible to the users on
our network.

Thanks,

DC Nash

***********************
You can unsubscribe from gptalk by sending email to
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR
by logging into the freelists.org Web interface. Archives for the list
are available at http://www.freelists.org/archives/gptalk/
************************
***********************
You can unsubscribe from gptalk by sending email to
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR by
logging into the freelists.org Web interface. Archives for the list are
available at http://www.freelists.org/archives/gptalk/
************************


***********************
You can unsubscribe from gptalk by sending email to 
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR by 
logging into the freelists.org Web interface. Archives for the list are 
available at http://www.freelists.org/archives/gptalk/
************************

Other related posts: