I want to make a script that will delete Registry Keys using wildcards, such as HKEY_CURRENT_USER\test00*. It also has to be able to delete specific files using environment variables such as %appdata% or %homedrive%.
what scripting language would be best to use? Autohotkey(AutoIt), VBS, batch? Any help please. Also, a good source of info for the selected language would be nice too.
Page 1 of 1
Script for Deleting files/reg keys
#3
Posted 11 October 2008 - 02:50 AM
Visual Basic is an EASY language which is easy to pick up and is extremely simple to delete a registry key.
Get Value
(keyName as string, Value Name, DefaultValue) is string
Environment Variables
Delete Value
Hope this helps,
Ply.
Get Value
Sub Main()
If My.Computer.Registry.GetValue("HKEY_CURRENT_USER\software\microsoft\windows\currentversion\policies\system\", _
"TestValue", Nothing) Is Nothing Then
MsgBox("Value does not exist.")
End If
threading.thread.sleep(10000)
End Sub(keyName as string, Value Name, DefaultValue) is string
Environment Variables
My.Computer.Registry.LocalMachine My.Computer.Registry.Users My.Computer.Registry.PerformanceData My.Computer.Registry.ClassesData My.Computer.Registry.CurrentConfig My.Computer.Registry.DynData My.Computer.Registry.ClassesData
Delete Value
Sub Main() My.Computer.Registry.LocalMachine.DeleteValue(name as string) My.Computer.Registry.LocalMachine.DeleteSubKey(subkey as string) My.Computer.Registry.LocalMachine.DeleteSubKeyTree(subkey as string) threading.thread.sleep(10000) End Sub
Hope this helps,
Ply.
This post has been edited by PlyPencil: 11 October 2008 - 02:58 AM
Share this topic:
Page 1 of 1

Help


Back to top









