| View previous topic :: View next topic |
| Author |
Message |
Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Fri Aug 19, 2011 11:18 pm Post subject: 2 Questions [SOLVED] |
|
|
Hi Forum
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 |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Sat Aug 20, 2011 2:22 am Post subject: |
|
|
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 |
|
 |
Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Sat Aug 20, 2011 8:54 am Post subject: |
|
|
Hi Chris
Thank you very much, killme.bat work fine
and about pendisk detection...... working in progress
Thank you again
Cheers |
|
| Back to top |
|
 |
|
|
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
|
|