|
-
Sep 22nd, 2000, 10:53 PM
#1
Thread Starter
Hyperactive Member
I need to know how to delete all dial-up networking accounts. Anyone know how?
-
Sep 23rd, 2000, 05:49 AM
#2
Frenzied Member
Go to My Computer, Dial Up Networking, and select each item and press the Delete key.
...or did you mean from code?
-
Sep 23rd, 2000, 11:46 AM
#3
Thread Starter
Hyperactive Member
-
Sep 23rd, 2000, 12:15 PM
#4
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
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
|