網路連線批次檔備忘

8 月 22, 2013 , , ,

Windows 的指令說明有夠爛!

此 .bat 批次檔可解決使用者帳號、密碼輸入,自動建立網路磁碟機及將網路卡重新啟動。

對於使用 Windows 作業系統分享網路檔案,使用者端使用異常時特別好用。

最值得注意的是,net use /? 的指令說明沒有 /y 此代替回答 Yes 的參數,導致查詢測試了一段時間,連一個指令說明都做不好的作業系統,實在不要太苛求了 ......... 超爛。

[batch]net use * /delete /y
net use Z: /delete /y
net use \\192.168.1.6\share /user:"username" "password"
net use Z: \\192.168.1.7\video /user:"username" "password"
netsh interface set interface "eth1" disabled
netsh interface set interface "eth1" enabled[/batch]

 

 1,359 total views,  1 views today

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。