[TurboC XP-SP2] Terminate but stay Resident(TSR)

Hello Forum.
I was trying to find a way to make a file delete itself. Then i came across TSR, which seems like a probable way of doing it. But then TSR requires its ows ISR(interrupt service routine) which XP doesn't seem to allow.
So my question is:
1.> Can i make an ISR in XP.
2.> Is it possible to write a TSR in XP.
3.> Is there any OTHER method to make a program respond to events but not show itself otherwise, like a virus?

Thanks
I believe TSRs were last implemented in Win98, but I could be wrong on that.

You could try asking around the NSIS forums how their uninstaller deletes itself. They're usually happy to help. Details: http://nsis.sourceforge.net/Community
Sep 4, 2010 at 1:15pm
@fatman: thanks for the link. I think the word "virus" is a taboo. nobody is wiling to get involved. Hello people i am not asking you to tell me how to make a virus. i just want to know how to make a file that deletes itself., just curious.

Regards

A TSR is an old DOS system concept that allowed a primative form of task switching.

Windows systems have locks on executable files -- you aren't supposed to delete an active exe. The proper way to do it is to have the system do it for you -- this is what uninstallers do regularly:

Add the proper delete command ("cmd.exe /c del /f /q \"PATHNAME.exe\"") under the "RunOnce" registry key (HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce). It does not matter what you name the value. The next time Windows is booted the command will be executed, deleting your file, and the command will be removed from the registry.

Hope this helps.
@Null : thanks for the link.
@Duoas: Thanks for the reply.
I appreciate your help.
Is there no way in windows that i load the complete program in memory and terminate the program(unlock the exe) and delete the exe.

Thanks
There is no kosher way as the only kinds of programs that try to do such things are malware.
@Duoas: Thanks for the tip.
the only kinds of programs that try to do such things are malware.

You said "try to do it". Is it possible in windows xp?
Did you visit the link I've posted?
Topic archived. No new replies allowed.