Skip to content

Commit

Permalink
Fix Uninstall
Browse files Browse the repository at this point in the history
Fixed the path to the dnscrypt-proxy files
  • Loading branch information
bitbeans committed Dec 1, 2018
1 parent 0faaa70 commit 54979b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions Uninstall/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Net.NetworkInformation;
using System.Threading;
using Microsoft.Win32;

namespace Uninstall
{
Expand Down Expand Up @@ -38,7 +38,7 @@ internal static void BackupConfigurationFile()
{
try
{
var sdcConfig = Path.Combine(Directory.GetCurrentDirectory(), "SimpleDnsCrypt.exe.config");
var sdcConfig = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SimpleDnsCrypt.exe.config");
if (!File.Exists(sdcConfig)) return;
var sdcConfigMap = new ExeConfigurationFileMap
{
Expand All @@ -51,7 +51,7 @@ internal static void BackupConfigurationFile()
var setting = section.Settings.Get("BackupAndRestoreConfigOnUpdate");
var backupAndRestoreConfigOnUpdate = Convert.ToBoolean(setting.Value.ValueXml.LastChild.InnerText);
if (!backupAndRestoreConfigOnUpdate) return;
var config = Path.Combine(Directory.GetCurrentDirectory(), DnsCryptProxyFolder,
var config = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DnsCryptProxyFolder,
DnsCryptProxyConfigName);
if (!File.Exists(config)) return;
var tmp = Path.Combine(Path.GetTempPath(), DnsCryptProxyConfigName + ".bak");
Expand Down Expand Up @@ -90,7 +90,8 @@ internal static void ExecuteWithArguments(string arguments)
const int timeout = 9000;
using (var process = new Process())
{
process.StartInfo.FileName = Path.Combine(Directory.GetCurrentDirectory(), DnsCryptProxyFolder, DnsCryptProxyExecutableName);
process.StartInfo.FileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
DnsCryptProxyFolder, DnsCryptProxyExecutableName);
process.StartInfo.Arguments = arguments;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
Expand Down
4 changes: 2 additions & 2 deletions Uninstall/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("1a9ca4fe-bdd5-4d7c-a86a-7ed503974718")]
[assembly: AssemblyVersion("0.2.3")]
[assembly: AssemblyFileVersion("0.2.3")]
[assembly: AssemblyVersion("0.2.4")]
[assembly: AssemblyFileVersion("0.2.4")]

0 comments on commit 54979b7

Please sign in to comment.