troubleshooting Question

Delete Self

Avatar of eNarc
eNarcFlag for United Kingdom of Great Britain and Northern Ireland asked on
4 Comments4 Solutions639 ViewsLast Modified:
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);
  AReg: TRegistry;
  AReg:= TRegistry.Create;
  AReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Uninstall', false);
  AReg.OpenKey(Name, true);
  AReg.WriteString('DisplayName', Name);
  AReg.WriteString('UninstallString', Path);

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.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 4 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros