Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is there any way to create a windows service and have that service load up a form and then minimize it to the system tray? I have a backup utility application that I wrote to backup a server, and one day the server went down while I was on vacation. I had them boot it back up, but the backup utility would not start unless a user logged into the server, which I did not allow while I was away. I would really like that backup utility to run as a service so I could avoid this problem the next time the server needs to be re-booted.

 

So far, I have tried to create a service that loads my main form in the OnStart() function. The service starts, but no form is loaded. Any ideas?

Posted

This may be a silly question, but did you try putting a link to your backup utility program in the Start folder? Or making a registry entry in one of the Run folders?

 

Edit:

 

NM I thought about it and answered my own question. Start and run work when you log in. Never tried making a service so unfortunately I won't be much of a help.

"Programmers are tools for converting caffeine into code."

 

Madcow Inventions -- Software for the Sanity Challenged.

  • Administrators
Posted

Services run under their own desktop - any forms they display will be displayed on this desktop and not visible to any other logged in user.

 

You would need to create a separate application that runs under the user's profile and communicates with the service.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
If I were to have a completely separate application that does all the work, could I use the service to start that application? If I did this, would the application just run in that 'other' desktop?
  • Administrators
Posted

The service would be set to auto-start and would therefore be automatically started when the server was rebooted.

 

The UI would be a separate application that would be launched either on demand by a user or as part of their start-up group (or similar).

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
I'm sorry, I still think I don't understand. The real question I think I have is can the GUI application BE the service? I use the GUI to display progress bars and I use it to set up backup scheduling. The software can also auto-burn backups as well, so the scheduling for that is also done through the GUI. Maybe this application is just not service material?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...