setup redesign

This commit is contained in:
Frank Skare
2020-12-09 22:01:33 +01:00
parent 33cdee5497
commit bf8636135a
3 changed files with 8 additions and 14 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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"""