Remove tray functionality from Partner App.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -13,14 +14,35 @@ namespace BodyshopPartner.Utils
|
||||
public static bool AddHttpExcetion()
|
||||
{
|
||||
logger.Debug("Attempting to add HTTP Exclusion for web-server");
|
||||
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
startInfo.FileName = "cmd.exe";
|
||||
startInfo.Arguments = "netsh http add urlacl url=http://+:1337/ user=\"Everyone\"";
|
||||
startInfo.Verb = "runas";
|
||||
process.StartInfo = startInfo;
|
||||
return process.Start();
|
||||
|
||||
string args = string.Format(@"http add urlacl url={0} user={1}", "http://+:1337/", "Everyone");
|
||||
|
||||
ProcessStartInfo psi = new ProcessStartInfo("netsh", args);
|
||||
psi.Verb = "runas";
|
||||
psi.CreateNoWindow = true;
|
||||
psi.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
psi.UseShellExecute = true;
|
||||
try
|
||||
{
|
||||
Process.Start(psi).WaitForExit();
|
||||
logger.Debug("Attempting to add HTTP Exclusion for web-server");
|
||||
return true;
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
logger.Error("Unable to register exception " + Ex.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||
// System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||
// startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
// startInfo.FileName = "cmd.exe";
|
||||
// startInfo.Arguments = "netsh http add urlacl url=http://+:1337/ user=\"Everyone\"";
|
||||
// startInfo.Verb = "runas";
|
||||
// process.StartInfo = startInfo;
|
||||
//return process.Start();
|
||||
}
|
||||
|
||||
public static void InitializeSquirrelAware()
|
||||
@@ -35,7 +57,7 @@ namespace BodyshopPartner.Utils
|
||||
logger.Debug("Installing via Squirrel Aware Helper. ", v);
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
bool successful = AddHttpExcetion();
|
||||
|
||||
if (successful)
|
||||
|
||||
Reference in New Issue
Block a user