I need to use VBScript to loop through a set of registry strin开发者_开发问答g value names located within a specific key, such as HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
and delete all the string values except for the ones that I specify.
I was able to successfully delete a specific string value using DeleteValue
and specifying the name of the string value. However, I would like to loop through each string value, get its name, check it and delete it if, for example, strValueName != "ccApp"
. Is there an easy way to achieve this?
Here's a solution that iterates through the key and outputs info to a file:
http://www.tech-archive.net/Archive/Scripting/microsoft.public.scripting.vbscript/2004-03/0353.html
精彩评论