Topics

Starting BB4W compiled program from Windows 10 task scheduler

ZeeZeeDave
 
Edited

I'm sure there's a simple solution that I am missing, but I can't find it!
I have a compiled BB4W program that that opens a small window on the Desktop and does various things, running on a Windows 10 machine.
When I double-click on its Desktop Shortcut, or when the machine re-boots, it sees another shortcut to the .exe of my program in the Startup folder, and my program starts and runs in the foreground, opening its window with the information it's meant to display.

For various reasons not relevant to this topic, my program needs to be stopped and restarted once a day, so it is programmed to exit at a configurable time. One minute later, Windows Task Scheduler is instructed to re-start the program, which it does, but this time it's run as a "background Task" according to Task Manager, with no window!.

Why not as a foreground task?

What can I do, to either the program or the Task Scheduler command, to enable the re-started program to run in the foreground, and still have it start from Startup and if necessary by double-clicking the shortcut?

Thanks

David

Richard Russell
 

On Tue, Nov 7, 2017 at 02:13 am, ZeeZeeDave wrote:
Why not as a foreground task?
I Googled it (so could you have) and there were several hits for this question.  One answer (for Windows 7, but it may still be relevant) was this: "I figured it out.  On the General Tab of the Task Scheduler properties page, I had checked the "Run whether user is logged on or not" box.  Apparently, that starts the task in a separate session.  When I checked the "Run only when user is logged on" box instead, the task does, indeed show up in the foreground."

Does that work for you?

Richard.

Richard Russell
 

On Tue, Nov 7, 2017 at 04:32 am, Richard Russell wrote:
Does that work for you?
Four weeks later and still no response. So I don't know whether my reply was helpful or not, nor whether the OP still has the problem or not.

Richard.

J.G.Harston
 

Richard Russell wrote:
...
was this: "I figured it out. On the General Tab of the Task Scheduler
properties page, I had checked the "Run whether user is logged on or
not" box. Apparently, that starts the task in a separate session.
When I checked the "Run only when user is logged on" box instead, the
task does, indeed show up in the foreground."
Does that work for you?
Well, I can confirm it works for me, WinXP and Win7.

--
J.G.Harston - jgh@... - mdfs.net/jgh