Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
AnswerRe: create a .csv file using a variable as the name Pin
Guffa13-Oct-07 5:51
Guffa13-Oct-07 5:51 
AnswerRe: create a .csv file using a variable as the name Pin
PIEBALDconsult13-Oct-07 4:33
mvePIEBALDconsult13-Oct-07 4:33 
GeneralRe: create a .csv file using a variable as the name Pin
mocasu13-Oct-07 4:45
mocasu13-Oct-07 4:45 
GeneralRe: create a .csv file using a variable as the name Pin
PIEBALDconsult13-Oct-07 5:10
mvePIEBALDconsult13-Oct-07 5:10 
GeneralRe: create a .csv file using a variable as the name Pin
PIEBALDconsult13-Oct-07 5:19
mvePIEBALDconsult13-Oct-07 5:19 
GeneralRe: create a .csv file using a variable as the name Pin
mocasu13-Oct-07 5:27
mocasu13-Oct-07 5:27 
Questionlaunching programs from a windows service Pin
NikoTanghe13-Oct-07 3:29
NikoTanghe13-Oct-07 3:29 
AnswerRe: launching programs from a windows service Pin
Dave Kreskowiak13-Oct-07 4:10
mveDave Kreskowiak13-Oct-07 4:10 
NikoTanghe wrote:
Process.start() simply returns, no program is launched, no exception is thrown...

what is wrong here ?


The problem is you don't understand how services work. Services run under their own desktop, NOT the users desktop that you can see. The Process.Start() code worked. The application was launched. All you have to do is open TaskManager and click on the Processes tab to see that.

You have to configure your service to interact with the users desktop. Click Start/Run, then type SERVICES.MSC and hit enter. Find your service in the list and double-click it. Click on the LogOn tab and find the little check box that says something like "Allow server to interact with desktop" and enable it.

Now, YOU HAVE A MUCH BIGGER PROBLEM. Services run all the time, even when noone is logged into the machine. So, with no user desktop to show an app, you're service will still launch the applications, but noone will ever see them because there is no user desktop! Just logging into the machine will NOT automatically show you the launched applications either. They will be running, but on the services desktop only. There is no way to transfer the application between desktops. In order for the logged in user to see them, the applications would have to be killed and restarted.

Notice, in the .NET Framework's Service classes, that you don't get any "User logged on" events...


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionHow to realize the smart indent in VC#? Pin
Seraph_summer13-Oct-07 3:01
Seraph_summer13-Oct-07 3:01 
AnswerRe: How to realize the smart indent in VC#? Pin
Steve Echols13-Oct-07 9:10
Steve Echols13-Oct-07 9:10 
Questionversion problem.. Pin
adilkazmi13-Oct-07 1:32
adilkazmi13-Oct-07 1:32 
AnswerRe: version problem.. Pin
pmarfleet13-Oct-07 1:50
pmarfleet13-Oct-07 1:50 
AnswerRe: version problem.. Pin
Dave Kreskowiak13-Oct-07 3:13
mveDave Kreskowiak13-Oct-07 3:13 
QuestionMenuStrip Pin
half-life13-Oct-07 1:17
half-life13-Oct-07 1:17 
AnswerRe: MenuStrip Pin
Dave Kreskowiak13-Oct-07 3:11
mveDave Kreskowiak13-Oct-07 3:11 
JokeRe: MenuStrip Pin
Anthony Mushrow13-Oct-07 3:38
professionalAnthony Mushrow13-Oct-07 3:38 
GeneralRe: MenuStrip Pin
half-life13-Oct-07 12:22
half-life13-Oct-07 12:22 
GeneralRe: MenuStrip Pin
Dave Kreskowiak13-Oct-07 15:12
mveDave Kreskowiak13-Oct-07 15:12 
GeneralRe: MenuStrip Pin
half-life13-Oct-07 19:06
half-life13-Oct-07 19:06 
QuestionMDI wizard Pin
half-life12-Oct-07 23:06
half-life12-Oct-07 23:06 
Questionoverride Hashtable question Pin
jason_mf12-Oct-07 22:15
jason_mf12-Oct-07 22:15 
AnswerRe: override Hashtable question Pin
Christian Graus12-Oct-07 23:13
protectorChristian Graus12-Oct-07 23:13 
Questioncommunication between two client Pin
8213001212-Oct-07 22:15
8213001212-Oct-07 22:15 
AnswerRe: communication between two client Pin
Christian Graus12-Oct-07 23:15
protectorChristian Graus12-Oct-07 23:15 
GeneralRe: communication between two client Pin
8213001212-Oct-07 23:45
8213001212-Oct-07 23:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.