Reputation: 494
I am using Plink to execute commands on remote computer. For example:
plink.exe -l login -pw password net stop spooler
Is it possible to do that after executing this command, Plink window will wait for my reaction (for example pressing button on keyboard)?
Upvotes: 1
Views: 1493
Reputation: 202262
Run the Plink from a batch file (e.g. execute_command.bat
) and add pause
command:
@echo off
plink.exe -l login -pw password hostname net stop spooler
pause
Or you can do the same using cmd.exe
, without using a separate batch file:
cmd.exe /C plink.exe -l login -pw password hostname net stop spooler & pause
Or you can use a server-side pause
-like command on Plink command-line.
From your use of net stop
, I assume the server is Windows, so again, you can use pause
:
plink.exe -l login -pw password hostname "net stop spooler & pause"
Upvotes: 1