請問這個批次檔該怎麼寫 - Windows

Table of Contents

※ 引述《knives ()》之銘言:
: ※ [本文轉錄自 EzHotKey 看板]
: 作者: knives () 看板: EzHotKey
: 標題: [請問] 請問這個批次檔該怎麼寫
: 時間: Sun May 10 04:00:14 2009
: 因為uTorrent預設一但非正常關閉程式,之後重開程式,就會再重新檢查檔案
: 比方說,在關機之前,若沒有先手動關閉程式的話,就會有上述的Bug
: 想說有沒有辦法寫個批次檔,自動幫我做關閉uTorrent的動作,放在關機時啟動
: 請問該怎麼寫
taskkill

它在普通呼叫時會試著送關閉訊號給程式

就像是手動點 X 一樣

用法是 taskkill /im 執行檔檔名

/im 表示後面的是檔名

像你要的就是 taskkill /im utorrent.exe

這樣就行了

至於關機時啟動...我就不太清楚 Windows 有沒有設計這種地方了

再說關機時 Windows 也是一樣的送關閉訊號給每支程式啊...

--
'You've sort of made up for it tonight,' said Harry. 'Getting the
sword. Finishing the Horcrux. Saving my life.'
'That makes me sound a lot cooler then I was,' Ron mumbled.
'Stuff like that always sounds cooler then it really was,' said
Harry. 'I've been trying to tell you that for years.'
-- Harry Potter and the Deathly Hollows, P.308

--

All Comments

Ursula avatarUrsula2009-05-13
還要再加個/f吧~變成 taskkill /f /im OOO.exe 強制
Caroline avatarCaroline2009-05-18
補一下,taskkill是xp pro才有 xp home沒有~
Blanche avatarBlanche2009-05-19
不過home要用的話~可以去pro抓執行檔放windows資料夾
Noah avatarNoah2009-05-20
/f 是強制關掉 就沒有他要的手動關掉效果了
Ivy avatarIvy2009-05-22
之所以文章裡沒講是他說要有手動關掉的效果
Jake avatarJake2009-05-23
囧~原PO說"自動幫我做關閉uTorrent的動作"..
Skylar DavisLinda avatarSkylar DavisLinda2009-05-25
我個人認為原PO應該是希望能直接關掉~╮(▔▽▔")╭