windows-services

Download customized setup from url with the query string parameters

谁都会走 提交于 2020-01-30 09:33:09
问题 I made a windows service application that I want to create a setup file. When User request application via our website url with query parameters, (Eg: http://test.com/setup.exe?id=1212) I need to change the current app.config key value to that query parameter value. I also need to update this application automatically when new release is ready. So ClickOnce or squirrel for windows might be an option but as I couldn't find way to achieve above task. Following questions are bit similar but don

Printing from a Windows Service [duplicate]

南楼画角 提交于 2020-01-29 23:30:13
问题 This question already has answers here : Printing from a .NET Service [closed] (11 answers) Closed 5 years ago . How can I printing a document on a specific printer from a Windows-Service without the need of any user-interaction? A string, or a text-file. Maybe Crystalreport? Thanks. 回答1: The point is not how to print from a windows service or from an application, if you don't want any user interaction to be required you have to specify all print parameters without any need to show a print

Printing from a Windows Service [duplicate]

余生颓废 提交于 2020-01-29 23:28:10
问题 This question already has answers here : Printing from a .NET Service [closed] (11 answers) Closed 5 years ago . How can I printing a document on a specific printer from a Windows-Service without the need of any user-interaction? A string, or a text-file. Maybe Crystalreport? Thanks. 回答1: The point is not how to print from a windows service or from an application, if you don't want any user interaction to be required you have to specify all print parameters without any need to show a print

Google Calendar Integration using Windows Service

前提是你 提交于 2020-01-25 23:45:45
问题 I setup Google account and enabled Calendar API . I created OAuth2.0 authentication using installed application option and downloaded the client secret JSON file. I created a windows form application and manipulated the events in Google Calendar. First time it was asked access permission and it was granted, and the authentication token file created in %AppData% folder path. It was working fine. But I need to create a windows service to add/update events in Google Calendar for different Google

Google Calendar Integration using Windows Service

主宰稳场 提交于 2020-01-25 23:43:08
问题 I setup Google account and enabled Calendar API . I created OAuth2.0 authentication using installed application option and downloaded the client secret JSON file. I created a windows form application and manipulated the events in Google Calendar. First time it was asked access permission and it was granted, and the authentication token file created in %AppData% folder path. It was working fine. But I need to create a windows service to add/update events in Google Calendar for different Google

Wix installer based TopShelf windows service fails to start

我怕爱的太早我们不能终老 提交于 2020-01-24 18:48:45
问题 I have written a bare-bones .NET 4.7.2 C# Windows Service using TopShelf and Quartz. The service works when I debug it using Visual Studio 2019 on my Windows 10 laptop. I then created a Wix 3.11.2 based setup to install and start this service. Now, I am trying to install the service on my laptop using this installer. The installer is able to copy the files but fails to start the service. Here is the code: Product.wxs <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft

UI for windows service in dot net

倖福魔咒の 提交于 2020-01-24 13:45:27
问题 I was creating a windows service in dot net to send automatic email to my friends. All is working well. Now I have a requirement like to show a pop up which says the mail has sent or something like that. But I need some idea to implement that logic. I think it’s not possible to have UI for windows service. SO I thought of creating another windows application to show the pop up message and call this from the windows service when the mail has sent. This is only the idea and not sure is this

Get user appdata path from windows service by running service under local profile

女生的网名这么多〃 提交于 2020-01-24 10:21:23
问题 I have a windows application. In that i have retrieved appdata using environment variable. So it gives me following path c:\document and settings\current user name\application data. But when I retrieve the appdata path from windows service using environment variable i get following path c:\windows\ServiceProfiles\LocalService\AppData\Local so this appdata path is different from appdata path that i got from windows application environments variable appdata path. I m running windows service

C# - Run WPF application from Windows Service

感情迁移 提交于 2020-01-24 06:15:50
问题 I have a service, which tracks whether WPF application is running on a computer. If it finds, that such application has been closed, then it openes it again. It's done in a loop. Yes, I know that this is bad practise for most of users, but there are cases, when it's necessary. What I did, is a service which for sure runs WPF application. Result is that, I can see this application in Task Explorer, but not on the screen. I also know, that constructor in App.xaml.cs fired, because I made there

How to know if a Windows session is an interactive one?

半城伤御伤魂 提交于 2020-01-23 12:08:11
问题 I'm creating a service that will run processes on user interactive session. I found how to start process from session 0 in a service, I found how to catch when a user is logged on. But I need to know if a Windows session is an interactive one or the list of interactive Windows sessions. 回答1: First setup your interop declarations. This is the hardest part DllImport("secur32.dll", SetLastError = false)] private static extern uint LsaFreeReturnBuffer(IntPtr buffer); [DllImport("Secur32.dll",