|
-
May 15th, 2008, 07:27 PM
#1
Thread Starter
Fanatic Member
[2005] Make serivce to run backup app Bonus: In express
we just got a project to run a program (syncback.exe) but the program will die when we log out
I would like to create a service that will run this program "in the background" but 1) i only have access to the 05 and 08 express editions ( i can get the full suit but its a pain in the rump at work)
is there anyway to create a serivce in express
and once I have the service created how do I make sure the app is always running
should i just use the timer.
-
May 15th, 2008, 09:04 PM
#2
Re: [2005] Make serivce to run backup app Bonus: In express
VB Express does not include the project template for a Windows Service so you have to either build it from scratch or else download and install a project template that someone else has created. If you search the Web you should be able to find one for 2005 at least, which should probably work in 2008 too.
What do you mean by:You can create a Process object for that process and handle its Exited event but I'm not sure it will be raised if the process ends abnormally. Regardless, you can use Process.GetProcessesByName to determine whether the app is running and, if it is, get a Process object for it. You can also use Process.Start to start it if it's not running, which will also get you a Process object.
-
May 16th, 2008, 01:50 AM
#3
Thread Starter
Fanatic Member
Re: [2005] Make serivce to run backup app Bonus: In express
http://www.eggheadcafe.com/fileupload/706982384_Windows Service.zip
Just place the file in C:\Documents and Settings\YOUR USERNAME\My Documents\Visual Studio 2005\Templates\ProjectTemplates
-
May 16th, 2008, 02:26 AM
#4
Re: [2005] Make serivce to run backup app Bonus: In express
Basically you cannot have exe files running when windows is in log off mode. If you want that exe to survive in log off mode then you need to convert that exe to windows service. The Windows NT/2000 Resource Kit provides some utilities that converts any exe into windows service. Have a look at this article. Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|