开发者

How does one loop through a set of string value names in a registry key?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜