Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How mark file to delete after restarting? 1

Status
Not open for further replies.

ZakiMaksyutov

Programmer
Feb 28, 2001
87
0
0
RU
I wrote one .exe file, which "uninstaller". It removes all, but also it should remove itself. To my mind I can "mark" this file and after restarting Windows deletes it, but I don't know how :(
May be someone know? Some exmples will be very great.

Thank for any help.





 
Well, I personally have no idea... BUT, I've noticed something. Whenever you run an uninstaller, it leaves certain files behind, namely the uninstaller and its dll's, etc. You always have to go in manual and delete the folder it was in. So I'm not sure what you want to do is possible, but I don't want to discourage you. Maybe it's just that nobody bothers. That actually would not surprise me in the least.

Good luck.
 
I think, the best idea is to use InstallShield. John Fill
1c.bmp


ivfmd@mail.md
 
I know it's possible to "mark" files, but I don't know how :(

I must not use InstallShield...
 
There exists a key
HKEY_LOCAL_MACHINEHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YourProgramName:
variables:
UninstallString = 'path to uninstatlling program'
DispalyName = 'what do you read in control panel add/remove programs'
After uninstalling, I believe(!) after restarting windows deletes file to wich point Uninstall string, if you don't delete key while uninstalling. John Fill
1c.bmp


ivfmd@mail.md
 
May be.
But there is one function:
MoveFileEx, which may "mark" file to deleting after restarting....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top