hankjrfan Posted June 9, 2005 Posted June 9, 2005 I would like to have a script run and on the last step delete itself. Just useing file delete does not work because the file is in use. I could call another script in the last step that deletes the origional script but I would rather not have it this way. Any suggestions? Thanks
hankjrfan Posted June 9, 2005 Author Posted June 9, 2005 Thanks! Works great I had to make some slight modifications since it will be running on win9x machines. $scriptpath=GetShortName(@SCRIPTFULLPATH) and of course replace @SCRIPTFULLPATH with $scriptpath
vbMark Posted June 9, 2005 Posted June 9, 2005 This worked for me: SuiCide() Func SuiCide() $scriptpath = FileGetShortName(@SCRIPTFULLPATH) Run(@ComSpec & " /c " & 'del /F ' & $scriptpath) Exit EndFunc
w0uter Posted June 9, 2005 Posted June 9, 2005 @MARK sometimes script will be still active while your trying to delete em. thats why there is a loop. @LARRY they should be locals My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
vbMark Posted June 9, 2005 Posted June 9, 2005 @MARKsometimes script will be still active while your trying to delete em.thats why there is a loop.@LARRYthey should be locals <{POST_SNAPBACK}>I tried the below script and it still deleted itself.SuiCide() Func SuiCide() $scriptpath = FileGetShortName(@SCRIPTFULLPATH) Run(@ComSpec & " /c " & 'del /F ' & $scriptpath) Do Sleep(1000) Until 1 = 0 EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now