Question Locked

Simple Windows Scheduled Tasks Question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to automatically schedule a daily sync session via windows scheduled tasks however I'm having one problem. The file I need to run opens a popup to select the profile and then I must click OK for the process to carry out. Once the auto scheduler runs the popup just sits there waiting for me to click OK and the task never gets run.

How do I fix this? Is there a way to just run the task, then pause, and make it hit enter? Please help ive been looking everywhere.

3 replies

by scott_heath

run a vbscript instead of the file. have the vbscript launch the file then use the sendkeys function to send the "enter". I use methods like this to script an entire POS keyboard config.

by dr.turkey

All it took was:
set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "otxps.exe"
WScript.Sleep 1000
objShell.SendKeys "{Enter}"
WScript.Quit

OMG i love you! ThX

This discussion is closed to new replies.