Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-27-2001, 11:36 AM
marc66 marc66 is offline
Member
 
Join Date: Jan 2001
Posts: 30
Default dial up connection folder

how do i delete the contents of my dial up connection folder in a single button click

code windows 95/98 compatible
Reply With Quote
  #2  
Old 01-28-2001, 02:02 AM
Lapince Lapince is offline
Senior Member
 
Join Date: Jan 2001
Posts: 163
Default RE: dial up connection folder

This folder doesn't exist !! Have a look at HKEY_CURRENT_USER\RemoteAccess\ and its subkeys... Here you'll find how to delete them in a click.
Reply With Quote
  #3  
Old 01-28-2001, 08:12 AM
marc66 marc66 is offline
Member
 
Join Date: Jan 2001
Posts: 30
Default RE: RE: dial up connection folder

if i am not asking too much could u PLEASE post the code that will delete all of the dial up connections in a button click

THANK YOU
Reply With Quote
  #4  
Old 01-28-2001, 09:59 AM
Lapince Lapince is offline
Senior Member
 
Join Date: Jan 2001
Posts: 163
Default RE: RE: RE: dial up connection folder

var
Reg: TRegistry;
Keys,Values: TStringList;
I: integer;
begin
Reg:=TRegistry.Create;
Keys:=TStringList.Create;
Values:=TStringList.Create;
Reg.RootKey:=HKEY_CURRENT_USER;
if not Reg.OpenKey('\RemoteAccess\Addresses') then Exit; // No remote access
Reg.GetValueNames(Values);
for I:=0 to Values.Count-1 do
Reg.DeleteValue(Values[I]);

if not Reg.OpenKey('\RemoteAccess\Profiles') then Exit; // No remote access
Reg.GetKeyNames(Keys);
for I:=0 to Keys.Count-1 do
Reg.DeleteKey(Keys[I]);

Reg.Free;
Values.Free;
Keys.Free;
end;

I must say I didn't test it :-) If you have problem with it, mail-me (lapince@lapince.com)
Reply With Quote
  #5  
Old 01-29-2001, 07:11 AM
Lapince Lapince is offline
Senior Member
 
Join Date: Jan 2001
Posts: 163
Default RE: RE: RE: RE: dial up connection folder

For people who will read the last answer, sorry, I made a mistake : I forgot a parameter... Add ", false" after the key name in Reg.OpenKey...
Example :
Reg.OpenKey('\RemoteAccess\Addresses', false)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.