I am doing some work with a Windows ServiceApplication and when I run the application it correctly writes a file with an updated value every 5 seconds with a timer. When I launch the application as a service, no file is written on Windows. Not sure what I am doing incorrectly or what I am missing? Any thoughts?
I changed the App's super to a ServiceApplication, and installed the service with the following sc command:
sc create Text type= own start= auto binpath= c:\Test\TestServices.exe
Service installation works well. I start the application and its supposed to overwrite a file to the desktop every 5 seconds with the added text value of elapsed seconds (5, 10, 15,etc). I start the service, and all is successful to this point. Unfortunately, there is no file created on the desktop. If I run the program in a command prompt or double click the program in an explorer window, then it works well and creates and overwrites the file every 5 seconds. Is there maybe an elevated permission needed to write a file with a ServiceApplication?
Here is the example file:
Thanks for your help :)