I need to change gateway address on multiple computers throughout the year and I wanted to create a batch file that would make my life a whole lot easier. The problem I am having is that once the batch file connects another computer, it no longer continues running the batch I coded until I "exit" from their computer and then it runs.
set /p ComName= Input Computer Name:
cd \diag
psexec \%ComName% cmd.exe
netsh interface ip set address name="local area connection" gateway=192.X.X.XXX gwmetric=0
ipconfig
After it runs the "psexec \%ComName% cmd.exe", what do I need to have that would allow the rest of my batch file run on the other computer?
PSEXEC. You wouldn't need to runCMD.EXEremotely. - aphoria