Skip to content

Commit 63c03d8

Browse files
committed
Made a proper class library, and added a demo project. Fixes #1.
1 parent bd78b3a commit 63c03d8

18 files changed

Lines changed: 819 additions & 266 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
obj/
2+
solution.sln.ide/
3+
bin/
4+
*.InstallLog

CreateProcessAsUser.cs

Lines changed: 0 additions & 265 deletions
This file was deleted.

DemoService/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>

DemoService/DemoService.Designer.cs

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DemoService/DemoService.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using murrayju.ProcessExtensions;
2+
using System.ServiceProcess;
3+
4+
namespace demo
5+
{
6+
public partial class DemoService : ServiceBase
7+
{
8+
public DemoService()
9+
{
10+
InitializeComponent();
11+
}
12+
13+
protected override void OnStart(string[] args)
14+
{
15+
ProcessExtensions.StartProcessAsCurrentUser("calc.exe");
16+
}
17+
18+
protected override void OnStop()
19+
{
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)