Self Delete or modify 
Author Message
 Self Delete or modify

I assume its not possible and I can't find anywhere that says it is...
but is it possible to write a vbs file that self deletes, or self modifies
itself ?

I would use such a file to quiz the user to get info to write an ini file
and then delete itself - or amend itself to not do it again.

I appreciate one could use an If Exist type script to always check for the
ini and create if it doesn't exist, but I feel this is sloppy when all
subsequent runs would not need to check.

Tom



Fri, 19 Jul 2002 03:00:00 GMT  
 Self Delete or modify

You can do whatever you like to a script file from within the running instance.  To "self destruct" at the normal exit point,

createobject("scripting.filesystemobject").deletefile wscript.scriptfullname

--
Michael Harris

  I assume its not possible and I can't find anywhere that says it is...
  but is it possible to write a vbs file that self deletes, or self modifies
  itself ?

  I would use such a file to quiz the user to get info to write an ini file
  and then delete itself - or amend itself to not do it again.

  I appreciate one could use an If Exist type script to always check for the
  ini and create if it doesn't exist, but I feel this is sloppy when all
  subsequent runs would not need to check.

  Tom



Fri, 19 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. fso.delete(self) - how to refer to self?

2. Self-modifying VBScipt example

3. Self-modifying Code

4. self-modifying Word document without macro

5. Self modifying code

6. self-modifying code (qbasic)

7. Are self modifying .exe's possible?

8. ??? self modifying EXE file - registration technique ???

9. self-modifying scaling

10. Self-Modifying Code?

11. Self Modify EXE / Constants...

12. Self delete

 

 
Powered by phpBB® Forum Software