1. 程式人生 > >冬天來了——的專欄

冬天來了——的專欄

如何copy東西到多臺遠端機器上:

假定使用者名稱和密碼均相同

set ip=xxx.xxx.xxx.101 ^
xxx.xxx.xxx.102 ^
xxx.xxx.xxx.103 ^
xxx.xxx.xxx.104 ^
xxx.xxx.xxx.105 ^
xxx.xxx.xxx.106

for %%i in (%ip%) do (
	net use \\%%i\c$ Passw0rd /user:Administrator
	xcopy C:\\upload \\%%i\c$\  /y
)

pause

查詢登錄檔sLanguage資訊:
for /f "skip=1 tokens=3" %i in ('reg query "HKCU\Control Panel\International" /v "sLanguage"') do @echo %i