Skip to content

Commit

Permalink
Fix scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
mgth committed Nov 16, 2015
1 parent ec5f548 commit ccc7c3b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions LittleBigMouse_Daemon/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Program : Application, ILittleBigMouseService
public static void Main(string[] args)
{
bool firstInstance;
Mutex mutex = new Mutex(true, "LittleBigMouse_Daemon" + Environment.UserName, out firstInstance);
Mutex mutex = new Mutex(true, Unique + Environment.UserName, out firstInstance);

if (!firstInstance)
{
Expand All @@ -39,9 +39,11 @@ public static void Main(string[] args)
using (ServiceHost host = new ServiceHost(prog, LittleBigMouseClient.Address))
{
// Enable metadata publishing.
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
ServiceMetadataBehavior smb = new ServiceMetadataBehavior
{
MetadataExporter = {PolicyVersion = PolicyVersion.Policy15}
};
//smb.HttpGetEnabled = true;
smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15;

host.Description.Behaviors.Add(smb);

Expand Down Expand Up @@ -215,9 +217,9 @@ public void Schedule()
//new BootTrigger());
new LogonTrigger());

var p = Process.GetCurrentProcess();
string filename = p.MainModule.FileName.Replace(".vshost", "");

//var p = Process.GetCurrentProcess();
//string filename = p.MainModule.FileName.Replace(".vshost", "");
string filename = AppDomain.CurrentDomain.BaseDirectory + AppDomain.CurrentDomain.FriendlyName.Replace(".vshost", "");

td.Actions.Add(
new ExecAction(filename)
Expand Down

0 comments on commit ccc7c3b

Please sign in to comment.