Discussion:
How do I enable popups from Task Scheduler
(too old to reply)
T
2022-11-12 09:07:26 UTC
Permalink
Hi All,

Windows 11 Pro 22H2

I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).

When run from a command shell or an icon on the desk
top, the pop ups run fine.

But no pop ups when run from the Task Scheduler.

How do I configure the Task Scheduler for the pop ups?

Many thanks,
-T
T
2022-11-12 11:15:51 UTC
Permalink
Post by T
Hi All,
Windows 11 Pro 22H2
I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).
When run from a command shell or an icon on the desk
top, the pop ups run fine.
But no pop ups when run from the Task Scheduler.
How do I configure the Task Scheduler for the pop ups?
Many thanks,
-T
I got told this on another group:

In order to display a user interface tasks
must be configured to run only when the user
is logged on. Otherwise they will run in
non-interactive session 0 and any user
interface they attempt to display will not
be visible.

My program must be run as administrator. The user
is not logged in a administrator

What now?
T
2022-11-12 12:46:18 UTC
Permalink
Post by T
Hi All,
Windows 11 Pro 22H2
I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).
When run from a command shell or an icon on the desk
top, the pop ups run fine.
But no pop ups when run from the Task Scheduler.
How do I configure the Task Scheduler for the pop ups?
Many thanks,
-T
    In order to display a user interface tasks
    must be configured to run only when the user
    is logged on. Otherwise they will run in
    non-interactive session 0 and any user
    interface they attempt to display will not
    be visible.
My program must be run as administrator.  The user
is not logged in a administrator
What now?
I figured out what I am going to do.

My program write a two line log file with the
date and time and the status every time it runs.

Since the user has to be logged in to see the
alerts, I will write a second program (ran as
the user when logged in) that picks up that
log file and sends pops up accordingly. And
run it five minutes
T
2022-11-12 12:47:43 UTC
Permalink
Post by T
Hi All,
Windows 11 Pro 22H2
I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).
When run from a command shell or an icon on the desk
top, the pop ups run fine.
But no pop ups when run from the Task Scheduler.
How do I configure the Task Scheduler for the pop ups?
Many thanks,
-T
    In order to display a user interface tasks
    must be configured to run only when the user
    is logged on. Otherwise they will run in
    non-interactive session 0 and any user
    interface they attempt to display will not
    be visible.
My program must be run as administrator.  The user
is not logged in a administrator
What now?
I figured out what I am going to do.

My program write a two line log file with the
date and time and the status every time it runs.

Since the user has to be logged in to see the
alerts, I will write a second program (ran as
the user when logged in) that picks up that
log file and sends pops up accordingly. And
run it five minutes
T
2022-11-12 13:47:33 UTC
Permalink
Post by T
Post by T
Hi All,
Windows 11 Pro 22H2
I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).
When run from a command shell or an icon on the desk
top, the pop ups run fine.
But no pop ups when run from the Task Scheduler.
How do I configure the Task Scheduler for the pop ups?
Many thanks,
-T
     In order to display a user interface tasks
     must be configured to run only when the user
     is logged on. Otherwise they will run in
     non-interactive session 0 and any user
     interface they attempt to display will not
     be visible.
My program must be run as administrator.  The user
is not logged in a administrator
What now?
I figured out what I am going to do.
My program write a two line log file with the
date and time and the status every time it runs.
Since the user has to be logged in to see the
alerts, I will write a second program (ran as
the user when logged in) that picks up that
log file and sends pops up accordingly.  And
run it five minutes after the first program.
It looks like WTSSendMessageA will wor
JJ
2022-11-12 13:40:47 UTC
Permalink
Post by T
Post by T
Hi All,
Windows 11 Pro 22H2
I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).
When run from a command shell or an icon on the desk
top, the pop ups run fine.
But no pop ups when run from the Task Scheduler.
How do I configure the Task Scheduler for the pop ups?
Many thanks,
-T
In order to display a user interface tasks
must be configured to run only when the user
is logged on. Otherwise they will run in
non-interactive session 0 and any user
interface they attempt to display will not
be visible.
My program must be run as administrator. The user
is not logged in a administrator
What now?
If the user is an Administrator type instead of Standard User type, simply
tick the "Run with highest provileges" checkbox. That's all.

However, if the user is a Standard User type, Microsoft psexec's `-i 1`
command line switch is supposedly for solving this problem, but apparently
is not working properly. In Windows 7, even though the program has been
shown on the taskbar and its window is responsive to mouse/keyboard inputs,
its window content fails to be drawn - leaving ghost images from other
application windows which were overlapping its window boundary. In Windows
10, the program's window is not even visible on the taskbar. I think psexec
need some bug fixing.
T
2022-11-12 13:48:19 UTC
Permalink
Post by JJ
Post by T
Post by T
Hi All,
Windows 11 Pro 22H2
I wrote a program that will pop up various pieces of information
(MessageBoxW from user32).
When run from a command shell or an icon on the desk
top, the pop ups run fine.
But no pop ups when run from the Task Scheduler.
How do I configure the Task Scheduler for the pop ups?
Many thanks,
-T
In order to display a user interface tasks
must be configured to run only when the user
is logged on. Otherwise they will run in
non-interactive session 0 and any user
interface they attempt to display will not
be visible.
My program must be run as administrator. The user
is not logged in a administrator
What now?
If the user is an Administrator type instead of Standard User type, simply
tick the "Run with highest provileges" checkbox. That's all.
Did not work for me
Post by JJ
However, if the user is a Standard User type, Microsoft psexec's `-i 1`
command line switch is supposedly for solving this problem, but apparently
is not working properly. In Windows 7, even though the program has been
shown on the taskbar and its window is responsive to mouse/keyboard inputs,
its window content fails to be drawn - leaving ghost images from other
application windows which were overlapping its window boundary. In Windows
10, the program's window is not even visible on the taskbar. I think psexec
need some bug fixing.
It looks like WTSSendMessageA will work.
Now to code it for Raku

Loading...