Solid Hosting // Blog

This is not intended to be a typical company blog. Surely, we may occasionally post some materials related to our web hosting services;
but most of all, we'll try to turn this into a helpful online resource, covering various topics in different areas of IT.
Posts tagged "Windows Service"

Set file/folder permissions during an MSI installation in C#

Problem: a Windows Service is designed to run under the Local Service account with minimum privileges on the local computer. Suppose, however, that the service needs to write logs/what have you locally, so we must create a folder for it to write to (usually in its Application/installation folder), and set the appropriate permissions to it....

Starting a process in any given Windows Terminal Session via C# and P/Invoke

(All code, presented here, is available at the end of the article as a ZIP file for download. As such, some definitions and declarations might be omitted, for brevity. This is why references to P/Invoke are NOT made, as all the definitions are already inserted in the code) An interesting problem came up one day,...

A simple way to update a Windows service (C#)

In a recent project of ours, the problem how to update a C# windows service arose.  We came up with a pretty simple way of doing it all. Here is how: There are three issues to tackle here: How to check whether a new version is available. How to download the new version How to install...