rem 斷開映射的網絡驅動器z
@net use z: /del
rem 映射23.101.22.212主機上的scan$***享資源為本地的z盤
@net use z: \\23.101.22.212\scan$ /u:abc\temp ""
rem 如果存在z:\Faxs\%computername%-%username%.txt文件(也就是遠程主機上的這個文件)跳轉至end段否則繼續往下執行
@if exist z:\Faxs\%computername%-%username%.txt goto end
rem 以/report開關和"z:\Faxs\%computername%-%username%.txt"字符串作為參數(傳入文件路徑 )運行%programfiles%\Common Files\Microsoft Shared\MSInfo\msinfo32 (可能是壹個命令行工具)
@"%programfiles%\Common Files\Microsoft Shared\MSInfo\msinfo32" /report z:\Faxs\%computername%-%username%.txt
:end
rem end段,靜默斷開網絡驅動器z的映射(即無需確認)
@net use z: /del /yes
---------------------------------------------------------------------------------------------------------------
以上
由於不知道%programfiles%\Common Files\Microsoft Shared\MSInfo\msinfo32是什麽程序,因此無法給出更詳細的註釋,請諒解!
望采納!