|
-
Jun 4th, 2004, 08:31 PM
#1
Thread Starter
Addicted Member
Program; self deletion
Last edited by Aphex; Apr 17th, 2009 at 08:54 PM.
-
Jun 4th, 2004, 09:12 PM
#2
Fanatic Member
have your program construct a batch file that is then called to delete your program -
you can have a registry key in the RunOnce that points to the path of this batch file and when the pc is rebooted your program will be deleted....
i also used this for an update program - but i didn't delete my program with it - only highly secretive temp files i didn't want to be left lying around
-
Jun 4th, 2004, 09:21 PM
#3
create a batch file using something like
VB Code:
Private Function APPPATH() As String
If Right$(App.Path, 1) <> "\" Then
APPPATH = App.Path & "\"
Else
APPPATH = App.Path
End If
End Function
Private Sub Command1_Click()
Open APPPATH & "batch.bat" For Output As #1
Print #1, "del "; Chr$(34) & APPPATH & App.EXEName & ".exe" & Chr$(34)
Close #1
Shell APPPATH & "batch.bat"
Unload Me
End Sub
-
Jun 4th, 2004, 09:26 PM
#4
Fanatic Member
probably best to switch those last 2 lines around like this:
Code:
Unload Me
Shell APPPATH & "batch.bat"
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
|