yuyuyuyu
Printable View
yuyuyuyu
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
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
probably best to switch those last 2 lines around like this:
Code:Unload Me
Shell APPPATH & "batch.bat"