16.04.2015 г.

Use mstsc with menu options with bat file

Create file.bat and put text:



@echo off
SET /P myVariable="Choice options: 1 - First 2 - Second 3 - Third"

echo
if %myVariable%==1 goto :First 
if %myVariable%==2 goto :Second 
if %myVariable%==3 goto :Third 



:First 
echo "Set First "
cmdkey /generic:ip /user:username /pass:passwords & mstsc.exe /v:ip
exit

:Second 
echo "Set Second "
cmdkey /generic:ip /user:username /pass:pass:passwords & mstsc.exe /v:ip

:Third 
echo "Set Third "
cmdkey /generic:ip /user:username /pass:pass:passwords & mstsc.exe /v:ip


Няма коментари :

Публикуване на коментар