Apr 21, 2003 #1 hskr4evr Technical User Sep 17, 2002 35 US With a vbscript, I want to check if the following registry key exists... HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Posix How can I do this in a vbscript?? If it exists, I want to delete it. Thanks.
With a vbscript, I want to check if the following registry key exists... HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Posix How can I do this in a vbscript?? If it exists, I want to delete it. Thanks.
Apr 21, 2003 #2 dougcranston Technical User Oct 5, 2001 326 US hskr4evr, Definitely possible. WMI/WSH based script can enumerate the keys and you just need to create a function to test for the key. For some related, but not exact references checkout the following site. Lots of great scripts. Use Wmi To Read Registry Value... http://cwashington.netreach.net/depo/view.asp?Index=767&ScriptType=jscript Enumerate Registry Values and Types http://www.microsoft.com/technet/tr...l=/technet/scriptcenter/registry/ScrReg08.asp Check out Scriptomatic.. Tool assists in writing WMI scripts that can be executed via cscript or wscript. http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/wmimatic.asp Hope this helps. DougCranston Upvote 0 Downvote
hskr4evr, Definitely possible. WMI/WSH based script can enumerate the keys and you just need to create a function to test for the key. For some related, but not exact references checkout the following site. Lots of great scripts. Use Wmi To Read Registry Value... http://cwashington.netreach.net/depo/view.asp?Index=767&ScriptType=jscript Enumerate Registry Values and Types http://www.microsoft.com/technet/tr...l=/technet/scriptcenter/registry/ScrReg08.asp Check out Scriptomatic.. Tool assists in writing WMI scripts that can be executed via cscript or wscript. http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/wmimatic.asp Hope this helps. DougCranston