diff --git a/mpv.net/Misc/App.cs b/mpv.net/Misc/App.cs index 0e4733f..144f11d 100644 --- a/mpv.net/Misc/App.cs +++ b/mpv.net/Misc/App.cs @@ -199,11 +199,9 @@ namespace mpvnet if (path != Folder.Startup) { - if (Msg.ShowQuestion("Would you like to setup mpv.net for the current startup location?", - "Current startup location:\n\n" + Folder.Startup + "\n\n" + + if (Msg.ShowQuestion("Would you like to setup mpv.net?", "The setup allows to create a start menu shortcut, file associations and " + - "add mpv.net to the Path environment variable.\n\n" + - "Show setup dialog?") == MsgResult.OK) + "adding mpv.net to the Path environment variable.") == MsgResult.OK) Commands.Execute("show-setup-dialog"); else diff --git a/mpv.net/WPF/SetupWindow.xaml.cs b/mpv.net/WPF/SetupWindow.xaml.cs index a6677d7..3a5a830 100644 --- a/mpv.net/WPF/SetupWindow.xaml.cs +++ b/mpv.net/WPF/SetupWindow.xaml.cs @@ -60,8 +60,8 @@ namespace mpvnet using (Process proc = new Process()) { proc.StartInfo.FileName = "powershell.exe"; - proc.StartInfo.Arguments = "-NoLogo -NoExit -ExecutionPolicy Unrestricted -File \"" + - Folder.Startup + "Setup\\uninstall.ps1\""; + proc.StartInfo.Arguments = "-NoLogo -NoExit -ExecutionPolicy Bypass -File \"" + + Folder.Startup + "Setup\\remove file associations.ps1\""; proc.StartInfo.Verb = "runas"; proc.StartInfo.UseShellExecute = true; proc.Start(); @@ -114,7 +114,7 @@ namespace mpvnet void ExecutePowerShellScript(string file) { - ProcessHelp.Execute("powershell.exe", "-NoLogo -NoExit -ExecutionPolicy Unrestricted -File \"" + file + "\""); + ProcessHelp.Execute("powershell.exe", "-NoLogo -NoExit -ExecutionPolicy Bypass -File \"" + file + "\""); } private void EditDefaultApp_Click(object sender, RoutedEventArgs e) diff --git a/setup.iss b/setup.iss index ea4b5a0..3513d05 100644 --- a/setup.iss +++ b/setup.iss @@ -26,7 +26,7 @@ AppPublisher=Frank Skare (stax76) Compression=lzma2 DefaultDirName={commonpf}\{#MyAppName} -OutputBaseFilename=mpv.net-setup-{#arch}-{#MyAppVersion} +OutputBaseFilename=mpv.net-{#MyAppVersion}-setup-{#arch} OutputDir={#GetEnv('USERPROFILE')}\Desktop DefaultGroupName={#MyAppName} SetupIconFile=mpv.net\mpvnet.ico @@ -39,10 +39,6 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; -[Run] -Filename: "{app}\{#MyAppExeName}"; Description: "Associate video file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc video" -Filename: "{app}\{#MyAppExeName}"; Description: "Associate audio file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc audio" -Filename: "{app}\{#MyAppExeName}"; Description: "Associate image file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc image" - [UninstallRun] -Filename: "{app}\{#MyAppExeName}"; Flags: runascurrentuser runhidden; Parameters: "--reg-file-assoc unreg" +Filename: "powershell.exe"; Flags: runhidden; Parameters: "-ExecutionPolicy Bypass -File ""{app}\Setup\remove file associations.ps1""" +Filename: "powershell.exe"; Flags: runhidden; Parameters: "-ExecutionPolicy Bypass -File ""{app}\Setup\remove start menu shortcut.ps1"""