
在 Powershell 中,我用來type -wait
觀察日誌檔案更新。
我想要一個上下文選單項目來開啟 powershell 視窗和type -wait
目標檔案。但我無法讓它發揮作用。
我在 .reg 檔案中嘗試了該命令的各種排列:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\WatchFIle]
"MUIVerb"="&Watch File"
[HKEY_CLASSES_ROOT\*\shell\WatchFIle\command]
@="powershell.exe -Command {type -wait \"%V\"}"
但所發生的只是短暫出現一個 Powershell 視窗。
我究竟做錯了什麼?