VBScript Scripting Techniques > Files > Self-Destruct
| WSH (WScript.ScriptFullName) | |
|---|---|
| VBScript Code: | |
|
' Author: Denis St-Pierre ' Function: Make a script delete itself Set objFSO = CreateObject( "Scripting.FileSystemObject" ) objFSO.DeleteFile WScript.ScriptFullName WScript.Quit |
|
| Requirements: | |
| Windows version: | any |
| Network: | any |
| Client software: | N/A |
| Script Engine: | WSH |
| Summarized: | Works in any Windows version, with WSH script engine (WSCRIPT.EXE and CSCRIPT.EXE). |
| [Back to the top of this page] | |
| unique visitors since July 2007 | page last uploaded: 6 April 2009, 00:08 |