|
-
Nov 25th, 2005, 08:14 AM
#1
Thread Starter
Junior Member
Delete Registry Key
Hi,
I am trying to delete one of the values in my registry using the follwoing code...
The Adding of the value works when i use "Registry.RegWrite".... but deleting is not working...
Private Sub Command1_Click()
If (Text1.Text = "O") Then
Registry_Write "HKEY_CLASSES_ROOT\MailTo\Shell\Open\Command\", "(Default)", """%ProgramFiles%\Outlook Express\msimn.exe""", "REG_EXPAND_SZ"
ElseIf (Text1.Text = "M") Then
Registry_Write "HKEY_CLASSES_ROOT\MailTo\Shell\Open\Command\", "(Default)", """C:\PROGRA~1\MICROS~2\Office\OUTLOOK.EXE""", "REG_SZ"
End If
End Sub
Private Sub Registry_Write(Key_Path As String, Key_Name As String, Key_Value As Variant, Optional Key_Type As String)
On Error Resume Next
Dim Registry As Object
Dim Registry_Value As Variant
Set Registry = CreateObject("WScript.Shell")
If (Key_Type = "") Then
Registry.RegDel Key_Path & Key_Name, Key_Value
Else
Registry.RegDel Key_Path & Key_Name, Key_Value, Key_Type
End If
MsgBox "Done"
End
End Sub
Can any one see and say..hwo to delete the key..
Thanks
-
Nov 25th, 2005, 08:49 AM
#2
Thread Starter
Junior Member
Re: Delete Registry Key
Any Shell Command to delete the Key would also work...???
-
Nov 25th, 2005, 09:51 AM
#3
PowerPoster
Re: Delete Registry Key
DeleteSetting is used to delete a registry key
-
Nov 25th, 2005, 10:09 AM
#4
Thread Starter
Junior Member
Re: Delete Registry Key
Hello,
It does not work... i even tried RegDelete, RegDel, RegRemove, RegRem, RegErase...
but none is working..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|