473,378 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C# Windows Service Question...

Hello,

I have created a windows service that executes a application (that has a
user interface), and therefore I have the "Allow service to interact with
desktop" checked...

I have found that because of the "Allow service to interact with desktop"
flag being turned on, I can not restart/reboot my system....

I do have the CanShutdown flag in my service set to "true"...

I have noticed that if I turn off the "allow service to interact with
desktop" flag, I am able to restart/reboot my system.... but, I need this
flag turned on...

Can anyone help my with this problem?

Thank you
Jul 21 '05 #1
1 1392
Hello all,
I figured out my problem...
It was because the process that I was launching from my service had a
winform which I did an override of the close to minimize to the system tray
instead of close out. I found that if all the applications do not close on
your desktop, the operating system will not shutdown... problem resolved...

"Shawn Buchanan-Cook" <sb****************@newsgroup.nospam> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
Hello,

I have created a windows service that executes a application (that has a
user interface), and therefore I have the "Allow service to interact with
desktop" checked...

I have found that because of the "Allow service to interact with desktop"
flag being turned on, I can not restart/reboot my system....

I do have the CanShutdown flag in my service set to "true"...

I have noticed that if I turn off the "allow service to interact with
desktop" flag, I am able to restart/reboot my system.... but, I need this
flag turned on...

Can anyone help my with this problem?

Thank you

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Eric Chong | last post by:
I created a Windows Service in C# that requires to get passed command arguments like a Console App. I noticed that there is an option "Start parameters" text box in the property of a Windows...
4
by: Bill Sonia | last post by:
I'm written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that once my send mail code is...
5
by: Richard Steele | last post by:
I have created a WinForm application that needs to be run as a windows service (the PC is inaccesible by any user) i have successfully installed the application as a windows service. When i start...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
2
by: shyam | last post by:
I have a C++ COM based windows service which have more than 30k lines of code and which is stablized over years. We need to take the advantage of the ..NET framework for this project, especially...
5
by: Tom | last post by:
Using multiple System.Timers.Timer objects in a Windows Service for performing multi-thread activities in a periodic fashion. Timers are AutoReset=false, to only have a single timer execution...
2
by: =?Utf-8?B?Sm9obiBG?= | last post by:
Hello All, I have a question about using an ActiveX control with a Windows Servce in C#. I believe it is not possible to properly setup an ActiveX control in a windows service as the particular...
41
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.