forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Delete your own exe after use

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jan 03, 2005 5:06 am    Post subject: Delete your own exe after use Reply with quote

Little example showing how to use a small batch file to delete your own
exe after it's done, and also delete the bat file itself. Great for installation
routines.

Code:
  DIALOG CREATE,Self Kill,-1,0,240,59
  DIALOG ADD,BUTTON,BUTTON1,19,24,193,24,Kill my own exe now!
  DIALOG SHOW

  WAIT EVENT

  LIST CREATE,1
  LIST ADD,1,:BEGIN
  LIST ADD,1,DEL @shortname(%0)
  LIST ADD,1,IF EXIST @shortname(%0) GOTO BEGIN
  LIST ADD,1,DEL @shortname(@path(%0))killme.bat
  LIST SAVEFILE,1,@path(%0)killme.bat
  LIST CLOSE,1
  RUNH @shortname(@path(%0))killme.bat
  EXIT


-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 642
Location: Eastern Indiana

PostPosted: Mon Jan 03, 2005 2:10 pm    Post subject: Reply with quote

Exclamation awesome Exclamation
I been doing that for a long time, but I had to use the CALL in my batch file, to call another one.
Your way is much nicer and less headache...
Thanks Garrett (I'll use it somedays I'm sure) Very Happy
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group