SYNTAX
cmd.exe /c start /min myfile.bat ^& exit
cmd /c start notepad
cmd /c start /min cmd /k notepad
- the
*.exe
is needed as start is no windows command that can be executed outside a batch /c
= exit after the start is finished- the
^& exit
part ensures that the window closes even if the batch does not end withexit
Running PuTTY
@echo off
cmd /c start <path:\putty.exe> <username>@server -P <port#> ^& exit
example:
cmd /c start c:\Users\User1\Desktop\putty.exe user@aa.bb.cc.dd -P 22 ^& exit
cmd /c start putty.exe user1@aa.bb.cc.dd -P 22 ^& exit
References