<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Windows Services in C#: Getting Started (part 2)</title>
	<atom:link href="http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/</link>
	<description>Making Microsoft .Net Development Magical</description>
	<lastBuildDate>Tue, 07 Feb 2012 16:57:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Bhim Prakash Singh</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-28038</link>
		<dc:creator><![CDATA[Bhim Prakash Singh]]></dc:creator>
		<pubDate>Mon, 25 Oct 2010 10:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-28038</guid>
		<description><![CDATA[Dear

                 i have create a windows service. its run find. i need to show notifyicon from windows service. i using C# for this code. 

                Thank in advance.


Bhim Prakash Singh
+91 9759020580]]></description>
		<content:encoded><![CDATA[<p>Dear</p>
<p>                 i have create a windows service. its run find. i need to show notifyicon from windows service. i using C# for this code. </p>
<p>                Thank in advance.</p>
<p>Bhim Prakash Singh<br />
+91 9759020580</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhim Prakash Singh</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-28037</link>
		<dc:creator><![CDATA[Bhim Prakash Singh]]></dc:creator>
		<pubDate>Mon, 25 Oct 2010 10:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-28037</guid>
		<description><![CDATA[Dear 

             I have a create Windows Service and i want to start hello.exe from windows service.

             I have start hello.exe but its show as backupgroup[ show under System user] i want to start hello.exe on my current user.

          Thanks in advance

Bhim Prakash Singh
+91 9759020580]]></description>
		<content:encoded><![CDATA[<p>Dear </p>
<p>             I have a create Windows Service and i want to start hello.exe from windows service.</p>
<p>             I have start hello.exe but its show as backupgroup[ show under System user] i want to start hello.exe on my current user.</p>
<p>          Thanks in advance</p>
<p>Bhim Prakash Singh<br />
+91 9759020580</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KC</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-27446</link>
		<dc:creator><![CDATA[KC]]></dc:creator>
		<pubDate>Fri, 22 Jan 2010 04:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-27446</guid>
		<description><![CDATA[You could use a group policy to run specific app at logon and apply the policy to only those individuals that needed to use the attendance system.]]></description>
		<content:encoded><![CDATA[<p>You could use a group policy to run specific app at logon and apply the policy to only those individuals that needed to use the attendance system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-27191</link>
		<dc:creator><![CDATA[Phil]]></dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-27191</guid>
		<description><![CDATA[Generally, when you start a service you expect it to start work immediately. As it stands your service waits for a minute before doing anything. You either need to call the _timer_Elapsed method manually or use System.Threading.Timer which allows you to specify an initial trigger delay and a repeat interval.]]></description>
		<content:encoded><![CDATA[<p>Generally, when you start a service you expect it to start work immediately. As it stands your service waits for a minute before doing anything. You either need to call the _timer_Elapsed method manually or use System.Threading.Timer which allows you to specify an initial trigger delay and a repeat interval.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arcanecode</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26728</link>
		<dc:creator><![CDATA[arcanecode]]></dc:creator>
		<pubDate>Sat, 23 May 2009 01:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26728</guid>
		<description><![CDATA[Sorry but you can&#039;t. Windows services don&#039;t allow &quot;pop ups&quot; or any other type of user dialog to appear. That&#039;s because Windows services can be running when no one is logged into the computer. 

I would instead suggest you write it as a System Tray type application. To be honest though it sounds like your application will wind up annoying the vast majority of your users, who will likely remember to login/off each day. I&#039;m guessing the app will only be helpful for a small number, and I&#039;m betting a lot of those who don&#039;t log off don&#039;t do so on purpose and a dialog is not going to change their behavior. I would look at some other method to try and alter the users behavior.]]></description>
		<content:encoded><![CDATA[<p>Sorry but you can&#8217;t. Windows services don&#8217;t allow &#8220;pop ups&#8221; or any other type of user dialog to appear. That&#8217;s because Windows services can be running when no one is logged into the computer. </p>
<p>I would instead suggest you write it as a System Tray type application. To be honest though it sounds like your application will wind up annoying the vast majority of your users, who will likely remember to login/off each day. I&#8217;m guessing the app will only be helpful for a small number, and I&#8217;m betting a lot of those who don&#8217;t log off don&#8217;t do so on purpose and a dialog is not going to change their behavior. I would look at some other method to try and alter the users behavior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simi_india</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26724</link>
		<dc:creator><![CDATA[simi_india]]></dc:creator>
		<pubDate>Fri, 22 May 2009 14:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26724</guid>
		<description><![CDATA[Hi all!

I want to generate a window service using c# for a window application for startup and stop, so that every time the user turn on the computer the application (attendance system) pop-up appear and during turning outthe computer the pop-up again appear on the desktop automatically, so that the user remember to logout for the day.]]></description>
		<content:encoded><![CDATA[<p>Hi all!</p>
<p>I want to generate a window service using c# for a window application for startup and stop, so that every time the user turn on the computer the application (attendance system) pop-up appear and during turning outthe computer the pop-up again appear on the desktop automatically, so that the user remember to logout for the day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: megan</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26373</link>
		<dc:creator><![CDATA[megan]]></dc:creator>
		<pubDate>Thu, 22 Jan 2009 13:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26373</guid>
		<description><![CDATA[where is part 1 and part 3?]]></description>
		<content:encoded><![CDATA[<p>where is part 1 and part 3?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nauman Farooq</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26269</link>
		<dc:creator><![CDATA[Nauman Farooq]]></dc:creator>
		<pubDate>Mon, 22 Dec 2008 11:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-26269</guid>
		<description><![CDATA[Thanks ....above article is really gud for beginners like me.]]></description>
		<content:encoded><![CDATA[<p>Thanks &#8230;.above article is really gud for beginners like me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lineker Araujo Tomazeli</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25910</link>
		<dc:creator><![CDATA[Lineker Araujo Tomazeli]]></dc:creator>
		<pubDate>Fri, 19 Sep 2008 14:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25910</guid>
		<description><![CDATA[thanks man! it was really helpfull]]></description>
		<content:encoded><![CDATA[<p>thanks man! it was really helpfull</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25762</link>
		<dc:creator><![CDATA[Rich]]></dc:creator>
		<pubDate>Wed, 30 Jul 2008 14:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25762</guid>
		<description><![CDATA[Sahar, I would say certainly.

protected void _timer_Elapsed(object sender, ElapsedEventArgs e)
{

_timer.Enabled = false;
// do your stuff
_timer.Enabled = true;
}

You would of course need to check that your code worked as otherwise the timer may neer get restarted.]]></description>
		<content:encoded><![CDATA[<p>Sahar, I would say certainly.</p>
<p>protected void _timer_Elapsed(object sender, ElapsedEventArgs e)<br />
{</p>
<p>_timer.Enabled = false;<br />
// do your stuff<br />
_timer.Enabled = true;<br />
}</p>
<p>You would of course need to check that your code worked as otherwise the timer may neer get restarted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sahar</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25748</link>
		<dc:creator><![CDATA[Sahar]]></dc:creator>
		<pubDate>Fri, 25 Jul 2008 04:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25748</guid>
		<description><![CDATA[Can you please tell me can we stop the timer on ealsped event to make the transactions to be ended successfully and then start the timer after getting the successful response is it possible to do so plz reply]]></description>
		<content:encoded><![CDATA[<p>Can you please tell me can we stop the timer on ealsped event to make the transactions to be ended successfully and then start the timer after getting the successful response is it possible to do so plz reply</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dv</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25381</link>
		<dc:creator><![CDATA[dv]]></dc:creator>
		<pubDate>Tue, 27 May 2008 19:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-25381</guid>
		<description><![CDATA[In case anyone has this too.

When you cut and paste the _timer_Elapsed code, make sure that the double quotes are not Microsoft Word annoying &#039;special&#039; slanted quotes.
Just type them in manually in your code window to be sure.]]></description>
		<content:encoded><![CDATA[<p>In case anyone has this too.</p>
<p>When you cut and paste the _timer_Elapsed code, make sure that the double quotes are not Microsoft Word annoying &#8216;special&#8217; slanted quotes.<br />
Just type them in manually in your code window to be sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arcanecode</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24581</link>
		<dc:creator><![CDATA[arcanecode]]></dc:creator>
		<pubDate>Thu, 28 Feb 2008 17:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24581</guid>
		<description><![CDATA[Deepak - Can&#039;t be done. Windows Services are not allowed to display any kind of user interface, as they are designed to be run &quot;unattended&quot;. 

Imagine a server with no one logged in, and one of it&#039;s windows services started displaying messages for no one to see? Lots of problems. 

What you could do is have the service write it&#039;s messages to the event log. Then write a separate program, maybe it could be an app that runs in the system tray. It&#039;s job would be to monitor the event log and look for messages your service writes. When it sees a new one it could then pop up the window you are wanting to display.]]></description>
		<content:encoded><![CDATA[<p>Deepak &#8211; Can&#8217;t be done. Windows Services are not allowed to display any kind of user interface, as they are designed to be run &#8220;unattended&#8221;. </p>
<p>Imagine a server with no one logged in, and one of it&#8217;s windows services started displaying messages for no one to see? Lots of problems. </p>
<p>What you could do is have the service write it&#8217;s messages to the event log. Then write a separate program, maybe it could be an app that runs in the system tray. It&#8217;s job would be to monitor the event log and look for messages your service writes. When it sees a new one it could then pop up the window you are wanting to display.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak Charate</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24572</link>
		<dc:creator><![CDATA[Deepak Charate]]></dc:creator>
		<pubDate>Thu, 28 Feb 2008 13:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24572</guid>
		<description><![CDATA[Hi friend i want to show windows form on the timer elapsed event in winservice program. Please reply me if this possible.
thanks]]></description>
		<content:encoded><![CDATA[<p>Hi friend i want to show windows form on the timer elapsed event in winservice program. Please reply me if this possible.<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Warrick Wilson</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24546</link>
		<dc:creator><![CDATA[Warrick Wilson]]></dc:creator>
		<pubDate>Tue, 26 Feb 2008 19:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24546</guid>
		<description><![CDATA[I&#039;m using VS 2008 and couldn&#039;t get the timer event to log anything. After a little Googling and trying a few things, I got the following to work:

        protected void _timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            string sSource = &quot;ArcaneTimeLogger&quot;;
            string sLog = &quot;Application&quot;; 

            if (!EventLog.SourceExists(sSource))
                EventLog.CreateEventSource(sSource, sLog);

            EventLog evt = new EventLog();
            string message = &quot;Arcane Time:&quot;
              + DateTime.Now.ToShortDateString() + &quot; &quot; 
              + DateTime.Now.ToShortTimeString();
            evt.Source = &quot;ArcaneTimeLogger&quot;;
            evt.WriteEntry(message, EventLogEntryType.Information);
        }]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m using VS 2008 and couldn&#8217;t get the timer event to log anything. After a little Googling and trying a few things, I got the following to work:</p>
<p>        protected void _timer_Elapsed(object sender, ElapsedEventArgs e)<br />
        {<br />
            string sSource = &#8220;ArcaneTimeLogger&#8221;;<br />
            string sLog = &#8220;Application&#8221;; </p>
<p>            if (!EventLog.SourceExists(sSource))<br />
                EventLog.CreateEventSource(sSource, sLog);</p>
<p>            EventLog evt = new EventLog();<br />
            string message = &#8220;Arcane Time:&#8221;<br />
              + DateTime.Now.ToShortDateString() + &#8221; &#8221;<br />
              + DateTime.Now.ToShortTimeString();<br />
            evt.Source = &#8220;ArcaneTimeLogger&#8221;;<br />
            evt.WriteEntry(message, EventLogEntryType.Information);<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StevenMcD</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24034</link>
		<dc:creator><![CDATA[StevenMcD]]></dc:creator>
		<pubDate>Sun, 03 Feb 2008 19:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-24034</guid>
		<description><![CDATA[Is it possible to start a new process in the OnShutDown() method? Everything I have tried fails miserably.]]></description>
		<content:encoded><![CDATA[<p>Is it possible to start a new process in the OnShutDown() method? Everything I have tried fails miserably.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colin</title>
		<link>http://arcanecode.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-10960</link>
		<dc:creator><![CDATA[colin]]></dc:creator>
		<pubDate>Wed, 08 Aug 2007 01:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/05/22/windows-services-in-c-getting-started-part-2/#comment-10960</guid>
		<description><![CDATA[Thanks.  It took me a while to find an article that is up with the current ver of VS and dotnet.  Helped me greatly.]]></description>
		<content:encoded><![CDATA[<p>Thanks.  It took me a while to find an article that is up with the current ver of VS and dotnet.  Helped me greatly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

