Home > Software engineering >  Consult how to use VB to delete a key in the registry?
Consult how to use VB to delete a key in the registry?

Time:10-24

Want to use the VB, delete the value, how to operate the



HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion/Run/
ScDesktop

Baidu to several methods are not, or failure, or no response, please can help give a code available, thank you

 
Private Declare Function SHDeleteKey Lib "shlwapi. DLL" Alias "SHDeleteKeyA" (ByVal hkeys As Long, ByVal pszSubKey As String) As Long
Const REG_DWORD=4
Const HKEY_LOCAL_MACHINE=& amp; H80000001


Private Sub Command1_Click ()
The Set w=CreateObject (" wscript. Shell ")
W.r egdelete "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run ", "ScDesktop
"End Sub


This can't
  • Related