<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx</link><description>Hey, Scripting Guy! How can I tell whether a value exists in the registry on a remote computer? -- AL 
 Hey, AL. Full disclosure time: even though we go by the name The Scripting Guys , we don’t claim to know everything there is to know about scripting</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3549589</link><pubDate>Thu, 31 Jan 2013 15:30:05 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3549589</guid><dc:creator>Niharika</dc:creator><description>&lt;p&gt;Hey I am getting the below error, do you have any idea how to resolve it?&lt;/p&gt;
&lt;p&gt; WshShell.RegRead: Invalid root in registry key &amp;quot;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App paths\winzip32.exe&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3549589" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3481599</link><pubDate>Fri, 17 Feb 2012 16:09:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3481599</guid><dc:creator>jeff</dc:creator><description>&lt;p&gt;Old topic, but I had an idea... &lt;/p&gt;
&lt;p&gt;reg query or reg compare&lt;/p&gt;
&lt;p&gt;Perhaps you could write a .bat to do the compare for you. Or you could have a script call the .bat or powershell script??&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3481599" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3450568</link><pubDate>Thu, 01 Sep 2011 07:48:21 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3450568</guid><dc:creator>ChalkOutline</dc:creator><description>&lt;p&gt;This is good advice, but:&lt;/p&gt;
&lt;p&gt;&amp;quot;If you run into situations where it doesn’t work, please let us know.&amp;quot;&lt;/p&gt;
&lt;p&gt;If you read a MULTI_SZ (into an array), the array returned is Null regardless of whether the key either doesn&amp;#39;t exist or exists and has no value set.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3450568" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3444245</link><pubDate>Fri, 29 Jul 2011 19:05:56 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3444245</guid><dc:creator>Larry</dc:creator><description>&lt;p&gt;If you&amp;#39;re looking to see if a key (not an item) exists, substitute strValueName = &amp;quot;&amp;quot;.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3444245" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3435948</link><pubDate>Thu, 16 Jun 2011 20:40:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3435948</guid><dc:creator>Enigma</dc:creator><description>&lt;p&gt;&amp;quot;THE REGISTRY KEY DOES NOT EXIST&amp;quot; Fix: &amp;nbsp;I&amp;#39;d like to REALLY reiterate hitchy&amp;#39;s comment that you must change the Get_Value method to the right one. &amp;nbsp;I was banging my head until I scrolled down, read the posts and realized why it couldn&amp;#39;t find my BINARY value. &amp;nbsp;Helps to read the methods available for StdRegProv: &amp;nbsp;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/aa393664(v=vs.85).aspx"&gt;msdn.microsoft.com/.../aa393664(v=vs.85).aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3435948" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3358704</link><pubDate>Wed, 29 Sep 2010 13:27:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3358704</guid><dc:creator>GaryM</dc:creator><description>&lt;p&gt;I&amp;#39;ve been looking at modifying this routine. This is my first script, so please excuse any lack of knowledge.&lt;/p&gt;
&lt;p&gt;What I want to do once this has found the key is then to say, find a value within the key, and if its equal to 272 - then to change it to 0 - is that possible?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3358704" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3354570</link><pubDate>Thu, 09 Sep 2010 21:34:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3354570</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;The only issue is that if you are looking for the Key (Default) and no value is set, then you will get a null value back even though the (Default) string value exists.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3354570" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3337120</link><pubDate>Wed, 09 Jun 2010 17:58:59 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3337120</guid><dc:creator>MeltonDBA</dc:creator><description>&lt;p&gt;How can I handle it if I don&amp;#39;t know the full strValueName? &amp;nbsp;Example: Determine if SQL Server is installed using this script. &amp;nbsp;I know under HKLM\SYSTEM\CurrentControlSet\Services holds the registry keys of each service Windows sees is installed. &amp;nbsp;So I want to look for SQL Server service, which the key will list as the name of the instance (default being mssqlserver, named instance being mssql$nameIT). &amp;nbsp;So I know the key will contain &amp;quot;MSSQL&amp;quot;, but for this script to check multiple servers I don&amp;#39;t know the full name of the key.&lt;/p&gt;
&lt;p&gt;Suggestions?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3337120" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3332458</link><pubDate>Thu, 13 May 2010 17:43:15 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3332458</guid><dc:creator>Tuscatsi</dc:creator><description>&lt;p&gt;The WMI documentation page [aa390788(VS.85).aspx] states that GetStringValue is a function that returns zero for success and non-zero for failure.&lt;/p&gt;
&lt;p&gt;I can use it in VBScript as you describe, but when using it in Excel VBA I get the error &amp;quot;the object invoked has disconnected from its clients&amp;quot; when I retrieve an item that doesn't exist.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3332458" width="1" height="1"&gt;</description></item><item><title>re: How Can I Tell Whether a Value Exists in the Registry?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/29/how-can-i-tell-whether-a-value-exists-in-the-registry.aspx#3328465</link><pubDate>Tue, 27 Apr 2010 03:11:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3328465</guid><dc:creator>hitchy</dc:creator><description>&lt;p&gt;In regard to the &amp;quot;The registry key does not exist.&amp;quot; return, are you sure the value you are looking for is a string and not a DWORD? If you are after a DWORD, substitute DWORD for String in the code ie.'GetStringValue' becomes 'GetDwordValue'&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3328465" width="1" height="1"&gt;</description></item></channel></rss>