I'm using Windows 7 with UAC activated. I want Eventghost to run with administrator privileges upon starting my PC. In order to do this, I have to schedule Eventghost to start in Windows Task Scheduler and run it with the highest privileges ticked. This way Eventghost starts with Administrator privileges.
Problem is, the Eventghost systray icon will not appear in my systray after its scheduled start. The Eventghost app does start, as I can see the process running, and it starts with administrator privileges, however, for some reason, the EG sytray icon will not appear.
I tried delaying EG's scheduled start by one minute, though that did not help.
Can this be fixed in the EG code, so the systray icon will appear in Windows 7 after starting as a scheduled task?
The reason I want EG to run with Administrator Privileges, is so it can run bat files that require administrator privs without getting a prompt window from the UAC.
Any advice is welcome. Thanks in advance.
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Systray icon won't appear when starting EG as sheduled task.
Re: Systray icon won't appear when starting EG as sheduled t
Well, I think I may have a work around for the systray icon not appearing upon scheduling EG to start in Windows Task Scheduler.
Upon creating the EG Task, I originally set the "Triggers" to Begin the task "at startup". I changed the trigger to Begin the task "On an event" and in the Trigger "Setting" box I selected "Basic" and set the "Log" to "System"
Having my Task configured this way, EG starts with the systray icon appearing.
Thought I'd share this FYI for anyone experiencing the same problem.
Upon creating the EG Task, I originally set the "Triggers" to Begin the task "at startup". I changed the trigger to Begin the task "On an event" and in the Trigger "Setting" box I selected "Basic" and set the "Log" to "System"
Having my Task configured this way, EG starts with the systray icon appearing.
Thought I'd share this FYI for anyone experiencing the same problem.
Re: Systray icon won't appear when starting EG as sheduled t
Thank you for posting your solution
Unfortunately it does not work for me.
I'm using Win7 / 32 bit and the current EventGhost version.
I set up the Task Scheduler according to your recommendations, as far as you reported them. Now EventGhost starts after the logon automatically, runs under the SYSTEM user. But the systray Icon does not appear and it does not react to events.
I have to run EventGhost as Admin, because the DVBViewer plugin requires this.
Atached are my Settings in the Task Scheduler (sorry for zip, could not upload several images).
Could you check my settings?
Thanks a lot !
Unfortunately it does not work for me.
I'm using Win7 / 32 bit and the current EventGhost version.
I set up the Task Scheduler according to your recommendations, as far as you reported them. Now EventGhost starts after the logon automatically, runs under the SYSTEM user. But the systray Icon does not appear and it does not react to events.
I have to run EventGhost as Admin, because the DVBViewer plugin requires this.
Atached are my Settings in the Task Scheduler (sorry for zip, could not upload several images).
Could you check my settings?
Thanks a lot !
- Attachments
-
- Task_scheduler.zip
- (393.46 KiB) Downloaded 104 times
Re: Systray icon won't appear when starting EG as sheduled t
Below I posted the exported settings I use for my task in TaskSchduler. Copy the code to a text editor, then save as filename.xml, then in task scheduler, you should be able to import the task. Not sure if it will work though, since the pc username and path to your program might be different.
If import doesn't work, I posted pics of my current task, and how it's configured. Currently it's been working fine for me and loading at boot with admin privileges. The only time I might experience a problem is if eventghost crashes, which causes eventghost to go into a restart loop, which I'll have to reboot my PC to correct the problem.
IMPORTANT: Make sure Eventghost isn't starting itself at boot. You need to got to EventGhost Options and untick AutoStart, otherwise it will conflict with the scheduled task. Also make sure a shortcut to evenghost is not in the Programs > Startup folder.

If import doesn't work, I posted pics of my current task, and how it's configured. Currently it's been working fine for me and loading at boot with admin privileges. The only time I might experience a problem is if eventghost crashes, which causes eventghost to go into a restart loop, which I'll have to reboot my PC to correct the problem.
IMPORTANT: Make sure Eventghost isn't starting itself at boot. You need to got to EventGhost Options and untick AutoStart, otherwise it will conflict with the scheduled task. Also make sure a shortcut to evenghost is not in the Programs > Startup folder.
Code: Select all
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2013-05-16T10:09:19.0284325</Date>
<Author>pcname\username</Author>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
</LogonTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>pcname\username</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>"C:\Program Files (x86)\EventGhost\EventGhost.exe"</Command>
<Arguments>-h -e OnInitAfterBoot</Arguments>
</Exec>
</Actions>
</Task>
Re: Systray icon won't appear when starting EG as sheduled t
Woww, great, thank you !
I will try this tonight (CET).
What are your settings at the "Generals" tab`? I suppose my problem is here.
I have user "SYSTEM", run without logon, with highest privileges. Attached is a screenshot (German) the layout is similar to the english version.
My environment is the following:
I'm running DVBViewer (a live TV application) under the Windows "Guest" account with restricted privileges. Unfortunately the DVBViewer plugin for EG needs to run with Admin privileges. So I'm trying to automatically start EG as Admin, when the Guest session starts.
I will try this tonight (CET).
What are your settings at the "Generals" tab`? I suppose my problem is here.
I have user "SYSTEM", run without logon, with highest privileges. Attached is a screenshot (German) the layout is similar to the english version.
My environment is the following:
I'm running DVBViewer (a live TV application) under the Windows "Guest" account with restricted privileges. Unfortunately the DVBViewer plugin for EG needs to run with Admin privileges. So I'm trying to automatically start EG as Admin, when the Guest session starts.
Re: Systray icon won't appear when starting EG as sheduled t
When I configured my task, I just left that setting to its default value, which is the name of the user account I log into. Not sure why you would need to change that, unless you're trying to configure a task for other accounts you created in Windows.awehring wrote:Woww, great, thank you !![]()
I will try this tonight (CET).
What are your settings at the "Generals" tab`? I suppose my problem is here.
I have user "SYSTEM", run without logon, with highest privileges. Attached is a screenshot (German) the layout is similar to the english version.
If you're just using this for the main account, leave it to its default value. If you need to configure it for other guest accounts you created, then set to what those accounts are named.
Re: Systray icon won't appear when starting EG as sheduled t
I imported your XML-Data into the Task Scheduler, adjusted the path to EventGhost.exe - and it works like a charm, if the user account under which it runs has admin privileges.
So far, so good.
But I could not manage to start EG via Task Scheduler (TS) under the Guest account with restricted privileges.
If I set the user account in the TS General settings to "Guest"
- after log on as Guest, EG does not start, it reports 0x41325 (The Task Scheduler service has asked the task to run.)
If I set the user to my "Admin" account and "Run whether user is logged on or not"
- after log on as Guest, EG does not start, TS reports 0x800704DD
- after log on as Admin, EG does start, but does not show the green arrow in the systray. Funnily it reacts to remote control events and starts the dvbviewer.exe process, if requested, but dvbviewer does not show up on the screen.
If I set the user account to "SYSTEM"
- The TS requires "Run whether user is logged on or not"
- EG does not work correctly, as above.
In addition, I tried to set the compatibility settings of EventGhost.exe to "Always run as Administrator" (right-click to EventGhost.exe). But this did not change the behavior.
In short: your solution works perfectly, if you are using an Admin account as your working account.
I'm trying to avoid this. My Guest account is without a password, for convenience.
Uhmmm.
So far, so good.
But I could not manage to start EG via Task Scheduler (TS) under the Guest account with restricted privileges.
If I set the user account in the TS General settings to "Guest"
- after log on as Guest, EG does not start, it reports 0x41325 (The Task Scheduler service has asked the task to run.)
If I set the user to my "Admin" account and "Run whether user is logged on or not"
- after log on as Guest, EG does not start, TS reports 0x800704DD
- after log on as Admin, EG does start, but does not show the green arrow in the systray. Funnily it reacts to remote control events and starts the dvbviewer.exe process, if requested, but dvbviewer does not show up on the screen.
If I set the user account to "SYSTEM"
- The TS requires "Run whether user is logged on or not"
- EG does not work correctly, as above.
In addition, I tried to set the compatibility settings of EventGhost.exe to "Always run as Administrator" (right-click to EventGhost.exe). But this did not change the behavior.
In short: your solution works perfectly, if you are using an Admin account as your working account.
I'm trying to avoid this. My Guest account is without a password, for convenience.
Uhmmm.
Re: Systray icon won't appear when starting EG as sheduled t
I'm assuming you're getting this error because your trying to run an application with administrator privileges on an account that has no administrator rights. Try making your guest account a member of the Administrator group.awehring wrote:
But I could not manage to start EG via Task Scheduler (TS) under the Guest account with restricted privileges.

Re: Systray icon won't appear when starting EG as sheduled t
Well, yes that's probably the solution.
But I want to avoid it. The PC is used as a media center and surfstation with a touchscreen. It is open accessible, the Guest account without a password. So I don't want to give the Guest account Admin rights.
Not everyone is always careful enough - sometimes including me.
But I want to avoid it. The PC is used as a media center and surfstation with a touchscreen. It is open accessible, the Guest account without a password. So I don't want to give the Guest account Admin rights.
Not everyone is always careful enough - sometimes including me.