I need to know how to delete all dial-up networking accounts. Anyone know how?
Printable View
I need to know how to delete all dial-up networking accounts. Anyone know how?
Go to My Computer, Dial Up Networking, and select each item and press the Delete key.
...or did you mean from code?
From code
All the connection names are located in the registry.
HKEY_CURRENT_USER\RemoteAccess\Profile
I think this is how you delete them:
Code:Private Declare Function RegDeleteKey Lib "advapi32.dll" _
Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey _
As String) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" _
(ByVal hKey As Long) As Long
Private Const HKEY_CURRENT_USER = &H80000001
Dim strKey As String
Dim lRegResult As Long
Public Sub DeleteKey(ByVal hKey As Long, ByVal strPath As String)
lRegResult = RegDeleteKey(hKey, strPath)
End Sub
Private Sub Command1_Click()
strKey = "RemoteAccess\Profile\ConnectionName"
lRegResult = RegCloseKey(strKey)
Call DeleteKey(strKey, HKEY_CURRENT_USER)
End Sub