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 


2 Questions [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Fri Aug 19, 2011 11:18 pm    Post subject: 2 Questions [SOLVED] Reply with quote

Hi Forum Smile
my questions are:

1) It's possible to self delete a Vds script on exit? How?

2) It's possible detect an Usb pendisk? How?

Many tnx in advance


Last edited by Tdk161 on Wed Aug 31, 2011 11:00 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Sat Aug 20, 2011 2:22 am    Post subject: Reply with quote

Answer to #1, yes. Call this at your close label. It creates a DOS bat file and runs it. It will delete the exe after it exits and then delete itself since it is running from memory.

As for #2 you can use @volinfo() to check if the drive is removable. Not sure how to check if it is a USB drive. Most everything now though.

Code:

  :Delete 
  %%delete = @new(list) 
  #delete this exe file with a batch file
  LIST ADD,%%delete,:BEGIN 
  LIST ADD,%%delete,DEL @shortname(%0) 
  LIST ADD,%%delete,IF EXIST @shortname(%0) GOTO BEGIN
  LIST ADD,%%delete,DEL @shortname(@path(%0))killme.bat 
  LIST SAVEFILE,%%delete,@path(%0)killme.bat 
  LIST CLOSE,%%delete 
  RUNH @shortname(@path(%0))killme.bat 
  stop 

_________________
Chris
Http://theblindhouse.com


Last edited by LiquidCode on Sat Aug 20, 2011 2:12 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat Aug 20, 2011 8:54 am    Post subject: Reply with quote

Very Happy
Hi Chris

Thank you very much, killme.bat work fine Smile

and about pendisk detection...... working in progress

Thank you again

Cheers
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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