Link to home
Start Free TrialLog in
Avatar of eNarc
eNarcFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Delete Self

Hi, I'm making an uninstaller.

I've been able to delete everything though only thing I'm unable to delete is the exe itself..

is there away of deleting the exe?

could I open up command to delete the file?? or anything like that?

procedure RegisterUninstall(Name, Path: String);
var
  AReg: TRegistry;
begin
  AReg:= TRegistry.Create;
  AReg.RootKey:= HKEY_LOCAL_MACHINE;
  AReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Uninstall', false);
  AReg.OpenKey(Name, true);
  AReg.WriteString('DisplayName', Name);
  AReg.WriteString('UninstallString', Path);
  AReg.Free;
end;

using the -uninstall paramstr

though the item in add and remove still stays there and the exe stays there also

anyway of deleting the exe and the entry in add and remove programs when removing.
ASKER CERTIFIED SOLUTION
Avatar of VahaC
VahaC
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of jimyX
jimyX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial