Rob van der Woude's Scripting Pages

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
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]

page last modified: 2016-09-19