|
-
Jan 31st, 2000, 01:20 AM
#1
Thread Starter
Hyperactive Member
Hello everybody!
I need to delete the MyApp.exe from MyApp.
HOW?
[This message has been edited by Jhd.Honza (edited 01-31-2000).]
-
Jan 31st, 2000, 02:33 AM
#2
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).]
-
Jan 31st, 2000, 11:41 AM
#3
Hyperactive Member
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).]
-
Jan 31st, 2000, 09:38 PM
#4
Member
-
Jan 31st, 2000, 09:57 PM
#5
Frenzied Member
Batch files can self delete!
put this in a file called c:\delete.bat
Code:
:start
del "c:\myexe.exe"
if exist "c:\myexe.exe" goto start
del c:\delete.bat
and it will delete itself
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).]
-
Feb 1st, 2000, 09:10 AM
#6
Hyperactive Member
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
-
Feb 1st, 2000, 05:49 PM
#7
Junior Member
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
-
Feb 1st, 2000, 06:07 PM
#8
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|