I need to restart a Backup exec remote agent service on a Server 2008 every day and would like to use a script for this. Unfortunately there is another service which depends on the one mentioned above.
This results in a need for user input (a 'Y' and [enter]) to the dependant service to restart aswell. I've spent several hours trying to get the required input sent to the command prompt (mainly using .sendkeys), but somehow I can't get the command prompt window activated (tryed appactivate). I can get the required charaters sent if I manually active the command prompt window first.
Can anyone help me with this? I've added my final attempt at the script below (and yes, I'm very much a novice with scripting :) ). I've left out the part stoping the service, I'm just concentrating on sending the char.
set objShell = WScript.CreateObject("WScript.Shell")
objshell.run "cmd.exe /k title cmd"