在同一台电脑上,以另外的用户来启动应用程序:
set username=atw
runas /profile /user:%username% /savecred "D:\client APP\Debug\MiOPC.exe"
"D:\client APP\Debug\MiServiceFileSync.exe"
*****************************************************************************
控制局域网电脑,重启:
@echo on
set IP=192.168.2.211
echo reset %IP%
net use \\%IP% "SC@1234" /user:Administrator
shutdown -r -t 60 -m \\%IP%
pause
*****************************************************************************