Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't delete registry key in win nt 4

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
Private Declare Function SHDeleteKey Lib "Shlwapi" Alias "SHDeleteKeyA" ( _
ByVal hKey As Long, ByVal lpSubKey As String) As Long

hCurKey = HKEY_LOCAL_MACHINE 'this is the hex value: &H80000002

strLastKey ="SOFTWARE\myCompany\MyProgram\MRU\file1"


if SHDeleteKey(hCurKey, strLastKey) <> 0 then
msgbox &quot;Delete of Registry Key Failed!&quot;
endif

'=====================
SHDeleteKey returns a 2. I can manually delete the key using regedit. Any ideas.

RegDeleteKey also does the same thing.....




Troy Williams B.Eng.
fenris@hotmail.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top