2

On Windows 7, i scheduled a task to run an .exe. on logon of any user. It works, but not seeing the program's GUI or Notification Area icon.

  • When run manually by a non-admin user, the desired .exe always requests an admin password. That is fine.
  • When run manually, a GUI (window) is displayed, and an icon is displayed in the notification area, which is good.
  • I want to see the same icon when the task is run by Task Scheduler.

Here's how i created a task in Task Scheduler to execute the .exe:

  • On 'General' tab, under "use the following user account", i select the admin user.
  • I choose "Run whether user is logged in or not".
  • UNcheck "run with highest privileges".
  • "Configure for: Windows 7"
  • Trigger: logon of any user.
  • Actions: my desired .exe.
  • Conditions: nothing checked.
  • Settings: checked on: Allow task to run on demand, Run as soon as possible, and If fails, restart every 1 minute. If running: do not start a new instance.

The program starts correctly-- on login, i can see the task running in Task Manager. But, i do not see the program's GUI or Notification Area icon.

Other Task Scheduler settings i've tried will not start the program. Eg, under "use the following user account", select "Users" or the specific non-admin user for whom the program should run, and pick "Run with highest privileges". Withs those settings, the program does not start on logon.

How to show the program's GUI and Notification Area icon?

The following questions do not appear to address this issue:

Scheduling a GUI program task and showing its GUI at login

Is it normal for scheduled task behaviour to differ from running the batch file manually?

Windows scheduled task interactive mode (GUI)

i also posted this question here:

https://social.technet.microsoft.com/Forums/en-US/d578b095-3409-4929-939e-ca9c38d39e1f/notification-icon-and-gui-missing-for-scheduled-admin-task

https://www.sevenforums.com/installation-setup/408805-notification-icon-gui-missing-scheduled-admin-task.html

thx

4
  • You're executing the program in the context of the admin user and not in the context of user. It's running in a different user session. What program are you actually trying to run? It might have options for the desired behavior. You could also include it in the default users "Startup" folder. That way it should be run in the user context if the logons and ask for a password.
    – Seth
    Commented Jul 6, 2017 at 6:26
  • @Seth, clearly it is running in admin context, instead of logged in user. That's cuz Task Scheduler, not cuz the program itself. It's very convenient that TS saves the admin pw. Can TS not run with elevated permissions in current context?
    – johny why
    Commented Jul 6, 2017 at 10:32
  • I could put a runas shortcut with saved pw in startup folder, but TS is easier, if it worked. Thx for reply.
    – johny why
    Commented Jul 6, 2017 at 10:34
  • Hi, @Seth, i tried your suggestion, putting a shortcut in the Startup folder. Not working-- the program does not launch, or ask me for password. I'm in Win 7, but this post says "windows 8 does not run startup shortcuts that have runasadmin flags, either in the shortcut itself or as a compatibility flag." eightforums.com/performance-maintenance/…
    – johny why
    Commented Jul 10, 2017 at 2:07

2 Answers 2

1

Solved. This issue with this particular application is that the password requirement is built into the app. There's no way to run the app without admin rights. No change to the app properties can override that.

Therefor, using runas, even in local user context, or storing the password in Task Manager won't run the app with admin rights in local context with GUI.

Therefor, i'll have to enter the password on every run. Not ideal, but at least i can automate the launch of the app with Task Manager. Here are the relevant settings-- just normal settings to run in local user context with local user rights:

General Tab: Run only when user logged on.

General Tab: Run only when user logged on

Triggers: At logon

Triggers: At logon

Actions: Program to run

Actions: Program to run

0

Re-adding my user on the task solved this for me: [Change User or Group...] > add your user account (even if it was set correctly) > [Done]

I hope this helps others who had issues with this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .