setup redesign
This commit is contained in:
@@ -199,11 +199,9 @@ namespace mpvnet
|
|||||||
|
|
||||||
if (path != Folder.Startup)
|
if (path != Folder.Startup)
|
||||||
{
|
{
|
||||||
if (Msg.ShowQuestion("Would you like to setup mpv.net for the current startup location?",
|
if (Msg.ShowQuestion("Would you like to setup mpv.net?",
|
||||||
"Current startup location:\n\n" + Folder.Startup + "\n\n" +
|
|
||||||
"The setup allows to create a start menu shortcut, file associations and " +
|
"The setup allows to create a start menu shortcut, file associations and " +
|
||||||
"add mpv.net to the Path environment variable.\n\n" +
|
"adding mpv.net to the Path environment variable.") == MsgResult.OK)
|
||||||
"Show setup dialog?") == MsgResult.OK)
|
|
||||||
|
|
||||||
Commands.Execute("show-setup-dialog");
|
Commands.Execute("show-setup-dialog");
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ namespace mpvnet
|
|||||||
using (Process proc = new Process())
|
using (Process proc = new Process())
|
||||||
{
|
{
|
||||||
proc.StartInfo.FileName = "powershell.exe";
|
proc.StartInfo.FileName = "powershell.exe";
|
||||||
proc.StartInfo.Arguments = "-NoLogo -NoExit -ExecutionPolicy Unrestricted -File \"" +
|
proc.StartInfo.Arguments = "-NoLogo -NoExit -ExecutionPolicy Bypass -File \"" +
|
||||||
Folder.Startup + "Setup\\uninstall.ps1\"";
|
Folder.Startup + "Setup\\remove file associations.ps1\"";
|
||||||
proc.StartInfo.Verb = "runas";
|
proc.StartInfo.Verb = "runas";
|
||||||
proc.StartInfo.UseShellExecute = true;
|
proc.StartInfo.UseShellExecute = true;
|
||||||
proc.Start();
|
proc.Start();
|
||||||
@@ -114,7 +114,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
void ExecutePowerShellScript(string file)
|
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)
|
private void EditDefaultApp_Click(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
10
setup.iss
10
setup.iss
@@ -26,7 +26,7 @@ AppPublisher=Frank Skare (stax76)
|
|||||||
|
|
||||||
Compression=lzma2
|
Compression=lzma2
|
||||||
DefaultDirName={commonpf}\{#MyAppName}
|
DefaultDirName={commonpf}\{#MyAppName}
|
||||||
OutputBaseFilename=mpv.net-setup-{#arch}-{#MyAppVersion}
|
OutputBaseFilename=mpv.net-{#MyAppVersion}-setup-{#arch}
|
||||||
OutputDir={#GetEnv('USERPROFILE')}\Desktop
|
OutputDir={#GetEnv('USERPROFILE')}\Desktop
|
||||||
DefaultGroupName={#MyAppName}
|
DefaultGroupName={#MyAppName}
|
||||||
SetupIconFile=mpv.net\mpvnet.ico
|
SetupIconFile=mpv.net\mpvnet.ico
|
||||||
@@ -39,10 +39,6 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
|||||||
Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
|
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]
|
[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