Ans = MsgBox ("すべてのアプリケーションを終了していますか?",4+32,"質問")
If Ans = vbYes then
Set FS = CreateObject("Scripting.FileSystemObject")
Set TMP = FS.GetFolder("C:\\Windows\\TEMP")
For Each Obj In TMP.Files
Obj.Delete
Next
For Each Obj In TMP.SubFolders
Obj.Delete
Next
MsgBox "クリアしました"
Else
MsgBox "何もせず終了します"
End If


VBスクリプト。拡張子はvbs。
スレ違いだから、この辺にしとけ。