Hello everybody!
I need to delete :D the MyApp.exe from MyApp.
HOW?
[This message has been edited by Jhd.Honza (edited 01-31-2000).]
Printable View
Hello everybody!
I need to delete :D the MyApp.exe from MyApp.
HOW?
[This message has been edited by Jhd.Honza (edited 01-31-2000).]
I don't think you can do it with your program running but it could be done during the startup/reboot process. You could attach a link to the user's autoexec.bat to delete it but then the line would still be there each time they start up. There is a registry key that may be usefull too
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
I believe that both Win 98 and 95 use this key. I can't vouch for any other versions.
[This message has been edited by nookta (edited 01-31-2000).]
I don't think that will be complicated, cause every exe is run from memory, not from disk, then deleting (killing) the file will keep your app running until you exit, and then it disappears.
(Am I clear???)
[This message has been edited by Juan Carlos Rey (edited 01-31-2000).]
You can't delete an application while it's running, Windows (or any OS) locks write access to the file so you can't do jack :cool: to it. You could try to call a batch file but then how would you delete that, bah. Good Luck :D
------------------
-Mystiq
Batch files can self delete!
put this in a file called c:\delete.bat
and it will delete itselfCode::start
del "c:\myexe.exe"
if exist "c:\myexe.exe" goto start
del c:\delete.bat
Your exe could write this code and then shell()it (with vbhide)
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
[This message has been edited by Mark Sreeves (edited 02-01-2000).]
You are absolutely right. I was thinking of my old times as QB 7 programmer. That happens when one trusts his memory and don't test his answers!
EXCUSE.ME
there is a file in the windows directory you can place a path in, when the system reboots the file at that path is deleted, i am not sure what the file is called sorry
I've done it before with the batch file method, but it really does seem dodgy.
Surely there's a better way?
------------------
Matthew Ralston
E-Mail: [email protected]
ICQ: 31422892
Web Site: My Home Page
AKA: ...::: The Fragmeinster :::... (On Quake 3 World Forums)
Sorry about my English, but my Scouse is dead good!