Windows 7 Task Scheduler Problem

Ask general questions here.
jmckinstry
Posts: 12
Joined: Mon Sep 30, 2013 5:01 pm

Windows 7 Task Scheduler Problem

Post by jmckinstry » Wed Jul 09, 2014 6:01 pm

I have created a very simple 2 line batch file to run my test suite.

cd C:\Users\xxxx\Documents\Ranorex\RanorexStudio Projects\NightlyRun\NightlyRun\bin\Debug
NightlyRun.exe

I tested it and it works correctly when run from the command line. The test just pulls up IE and goes through a series of steps and closes. Nothing fancy.

The problem is when I set it up to run as a task under Task Scheduler. Every time that it runs, IE starts minimized and my test fails. Like I said above, running the test from the command line works perfectly. What is even more strange, I downloaded a freeware task scheduler (Freebyte Task Scheduler) and it works correctly (IE is not minimized).

Any ideas?

Thanks for your help.

bewiss
Posts: 16
Joined: Mon Feb 24, 2014 3:11 pm

Re: Windows 7 Task Scheduler Problem

Post by bewiss » Thu Jul 10, 2014 11:06 am

Did you try this, after starting your IE, before beginning your tests?

repo.<your-IE-Instance>.Self.Maximize();

jmckinstry
Posts: 12
Joined: Mon Sep 30, 2013 5:01 pm

Re: Windows 7 Task Scheduler Problem

Post by jmckinstry » Thu Jul 10, 2014 6:51 pm

Thanks for the suggestion bewiss. I did not see the last line of your post and just opened up IE and kicked off the test via the batch file and it worked. After that, I tried it again without opening IE and it worked also. Not sure why, but thank you a bunch for your suggestion.