Question

Can someone help me with this command? I basically want PSEXEC to execute a batch file in minimised mode, then shut it down after 100 seconds. I've had complaints that PSEXEC is too obtrusive to the remote users. They want it hidden and to close down itself.

Currently I have this to start PSEXEC and call the batch file:

  psexec -i -s \\YOURPC \\YOURPC\alert.cmd

alert.cmd is a follows:

start /min cmd /k "echo Hello world" /timeout /t 100

This works without time out, but I can't figure out how to get the timer working on the alert.cmd

Thanks!

Was it helpful?

Solution

start /min cmd /k "echo Hello world && timeout /t 100"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top