Skip to content

Commit

Permalink
Merge pull request Squirrel#109 from mwcampbell/fix-update-uninstaller
Browse files Browse the repository at this point in the history
Include the --uninstall option in the uninstaller command line by default
  • Loading branch information
anaisbetts committed Oct 28, 2014
2 parents 7afa540 + fb55fb6 commit ebc56c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Squirrel/UpdateManager.InstallHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public async Task<RegistryKey> CreateUninstallerRegistryEntry(string uninstallCm
public Task<RegistryKey> CreateUninstallerRegistryEntry()
{
var updateDotExe = Path.Combine(rootAppDirectory, "Update.exe");
return CreateUninstallerRegistryEntry(updateDotExe, "-s");
return CreateUninstallerRegistryEntry(String.Format("{0} --uninstall", updateDotExe), "-s");
}

public void RemoveUninstallerRegistryEntry()
Expand Down
6 changes: 3 additions & 3 deletions src/Update/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public async Task Install(bool silentInstall, string sourceDirectory = null)
"Failed to copy Update.exe to " + updateTarget);

await this.ErrorIfThrows(() =>
mgr.CreateUninstallerRegistryEntry(String.Format("{0} --uninstall", updateTarget), "-s"),
mgr.CreateUninstallerRegistryEntry(),
"Failed to create uninstaller registry entry");
}
}
Expand All @@ -190,7 +190,7 @@ public async Task Update(string updateUrl, string appName = null)
var updateTarget = Path.Combine(mgr.RootAppDirectory, "Update.exe");

await this.ErrorIfThrows(() =>
mgr.CreateUninstallerRegistryEntry(String.Format("{0} --uninstall", updateTarget), "-s"),
mgr.CreateUninstallerRegistryEntry(),
"Failed to create uninstaller registry entry");
}
}
Expand Down Expand Up @@ -574,4 +574,4 @@ public void Dispose()
lock(gate) inner.Dispose();
}
}
}
}

0 comments on commit ebc56c9

Please sign in to comment.