Showing posts with label windows service. Show all posts
Showing posts with label windows service. Show all posts

Thursday, September 12, 2013

Install Windows Service using CMD

1) Run CMD as administrator.

2) Browse to the installutil.exe folder located at C:\Windows\Microsoft.NET\Framework\v4.0.30319 or similar.

3) Key in command "installutil.exe ". 

4) Depending on your login mode, you may be prompted for "Service Login". Key in the username (with domain) and password.

5) If successful, you will see 2 additional files in the folder of your .exe file with the extensions ".INSTALLLOG" and ".INSTALLSTATE".

6) Refresh "Services" and you should see your Service there.

Wednesday, August 4, 2010

Windows Service Vs. Scheduled Task

Windows Service
  • Interval specific, i.e. you can create a timer that runs every 4 hours etc
  • Runs all the time.
  • You can set up listener events to push actions
  • No GUI. Any interaction will be carried out via EventLogs, counters and such.
  • Runs in own security context, i.e. does not need to care which user logs in etc.
  • More reliable?
Scheduled Task
  • You can specify exact timing, e.g. 8pm every Wednesday.
  • There is a console to display output messages.
  • You can run the application based on logged in user.

Monday, July 13, 2009

Scheduled Tasks using Windows Service

1) Create a new Console Application (WindowsScheduledTask) using Visual Studio .NET.
- This console application contains the code for your scheduled task
- Example: Archive database records, Send email alert
2) Go to Windows Start -> Control Panel -> Scheduled Tasks.
- Clicking Add Scheduled Tasks will launch the Scheduled Task Wizard
- Click on “Browse” to add the scheduled task application (WindowsScheduledTask.exe)
- Set the scheduling properties
3) You can set advanced properties for the task by checking the box at the last segment of the wizard.
- Check “Show multiple schedules” to run the task more than once a day
- You can also set the start date and end date of the task