setup redesign
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
10
setup.iss
10
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"""
|
||||
|
||||
Reference in New Issue
Block a user