diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-03-02 10:01:38 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-03-02 10:01:55 -0500 |
| commit | 334c0692074470fd6a500a8d93113e3684f3fc5b (patch) | |
| tree | 824c834cfe222f0f26ee93ff536b76f4501c71fc /MediaBrowser.Uninstaller/Program.cs | |
| parent | e8f5fade43b4e19825fe6d628a76538157f1fc18 (diff) | |
Improve waiting for things to end in (un)installer
Diffstat (limited to 'MediaBrowser.Uninstaller/Program.cs')
| -rw-r--r-- | MediaBrowser.Uninstaller/Program.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MediaBrowser.Uninstaller/Program.cs b/MediaBrowser.Uninstaller/Program.cs index 8ea1a950a..2947d1e15 100644 --- a/MediaBrowser.Uninstaller/Program.cs +++ b/MediaBrowser.Uninstaller/Program.cs @@ -24,8 +24,11 @@ namespace MediaBrowser.Uninstaller var sourceDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ""; File.WriteAllBytes(tempExe, File.ReadAllBytes(Path.Combine(sourceDir, "MediaBrowser.Uninstaller.Execute.exe"))); File.Copy(Path.Combine(sourceDir, "MediaBrowser.Uninstaller.Execute.exe.config"), tempConfig, true); + + //get our pid to pass to the uninstaller so it can wait for us to exit + var pid = Process.GetCurrentProcess().Id; //kick off the copy - Process.Start(tempExe, product); + Process.Start(tempExe, product + " " + pid); //and shut down } } |
