電驢沒有慧星的自動關機功能,以下內容找來的。 先寫一個auto-off.vbs dim dir,cmd,cmd1,cmd2,ws,count dim chksize,NoShutdown,result dir="u:/temp/emule/tmp" Set fso=CreateObject("Scripting.FileSystemObject") cmd="shutdown -s -f -t 60" cmd1="shutdown.exe -a" cmd2="taskkill.exe /im wscript.exe /f" NoShutdown= 0 Set ws=WScript.CreateObject("WScript.Shell") Wscript.Echo "emule auto power off running" count=0 do until count<-1 chksize = fso.GetFolder(dir).Size If chksize=0 then ws.run cmd,0 NoShutdown= 1 End If If NoShutdown =1 then result=msgbox("if keep power on "&vbcrlf&" press OK to keep power on, press cancel to continue power off process ",48+1+256,"Emule auto poweroff") if result=vbok then ws.run cmd1,0 ws.run cmd2,0 End If End If WScript.Sleep 120000 loop 然後,執行它!! wscript auto-off.vbs 在 task 裡面,就會出現一個檢查 u:\temp\emule\tmp 目錄的 wscript 程序, 當沒有暫存檔案,表示下載完成,就會執行 shutdown 命令。