Jump to content
Sign in to follow this  
SoulA

Windows Service Question

Recommended Posts

SoulA

This might not be a AutoIt question but more of a Windows guru question. Why is it when I run my app as a service with the ability to interact with the desktop and with a tray icon that when I log off the logged on user the service exe then exits and stops running?

Is there anyway to stop this from happening? Everything seems to work fine when I let the executables run as a service without desktop interaction.

Share this post


Link to post
Share on other sites
99ojo

This might not be a AutoIt question but more of a Windows guru question. Why is it when I run my app as a service with the ability to interact with the desktop and with a tray icon that when I log off the logged on user the service exe then exits and stops running?

Is there anyway to stop this from happening? Everything seems to work fine when I let the executables run as a service without desktop interaction.

Hi,

i guess, you are running your app as a service with your own credentials.

Try to start the service with LocalSystem account with desktop interaction.

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites
SoulA

Nope it is running under the system account. Probably should have mentioned that as well.

Share this post


Link to post
Share on other sites
99ojo

Nope it is running under the system account. Probably should have mentioned that as well.

Hi,

o.k: Next guesses:

1 st guess: I think its a problem with the tray icon. If the tray icon isn't necessarily needed, you may compile your exe again with option NoTrayIcon and see whats happening.

2 nd guess: If your exe dont have to run always, start your exe when someone is logging on: HKLM\Software\Microsoft\Windows\CurrentVersion\Run. Keep in your mind that the exe is then running under user credentials.

;-))

Stefan

Share this post


Link to post
Share on other sites
SoulA

Hi,

o.k: Next guesses:

1 st guess: I think its a problem with the tray icon. If the tray icon isn't necessarily needed, you may compile your exe again with option NoTrayIcon and see whats happening.

2 nd guess: If your exe dont have to run always, start your exe when someone is logging on: HKLM\Software\Microsoft\Windows\CurrentVersion\Run. Keep in your mind that the exe is then running under user credentials.

;-))

Stefan

Yes but I want the tray icon to be visible and I want it to run as a service. I'm not sure its entirely the icon's fault either. I have had other autoit programs run that had desktop interaction set and had no tray icon and they did the same things.

Share this post


Link to post
Share on other sites
SoulA

where are my windows admins?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×