Login | |
|
 |
RE: Self Deleting script - 7/8/2008 2:28:34 AM
|
|
 |
|
| |
Rischip
Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
|
The first one works just fine. The scripting engine does not hold the file open with a lock during execution.
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
 |
RE: Self Deleting script - 7/8/2008 3:25:32 AM
|
|
 |
|
| |
Rischip
Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
|
The script is being run from memory. The file resides on disk. Therefore the cleanup after the delete is legit. In general the script engine will cleanup after itself fairly well, but I write many LONG running scripts and generally cleanup after myself. In this instance there is no particular reason to do it, but also no particular reason not to do it.
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
 |
RE: Self Deleting script - 7/8/2008 7:24:36 PM
|
|
 |
|
| |
4scriptmoni
Posts: 200
Score: 0
Joined: 5/3/2007
Status: offline
|
well my reason was simple, the script contatins passwords and I am running then remotely using psexec, so I copy then to the server call it using psexec... but yes when I call with psexec, I also try to delete it from there, so I do it 2 times just to be sure...
_____________________________
Enterprise Microsoft Scripts Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc... http://www.felipeferreira.net
|
|
| |
|
|
|
 |
RE: Self Deleting script - 7/9/2008 1:05:32 AM
|
|
 |
|
| |
Rischip
Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
|
Instead of copying a script with passwords in it, you should copy a stub script which runs the other script off of a file share.
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
|
|