SDA-2394 Commandline installation properties

This commit is contained in:
Mattias Gustavsson
2020-09-10 09:15:10 +02:00
parent 8c98bd63b5
commit bd7a8c6e18
2 changed files with 18 additions and 12 deletions

View File

@@ -110,7 +110,7 @@ class Script
// https://docs.microsoft.com/en-us/windows/win32/msi/operating-system-property-values
new LaunchCondition("VersionNT>=600 AND WindowsBuild>=6001", "OS not supported"),
// Add registry entry used by protocol handler to launch symphony when opening symphony:// URIs
// Add registry entry used by protocol handler to launch symphony when opening symphony:// URIs
new RegValue(WixSharp.RegistryHive.ClassesRoot, productName + @"\shell\open\command", "", "\"[INSTALLDIR]Symphony.exe\" \"%1\"")
);
@@ -123,25 +123,23 @@ class Script
// these when running the installer, but if not specified, the defaults will be used.
project.Properties = new[]
{
new PublicProperty("ALLUSERS", "true"),
new PublicProperty("ALWAYS_ON_TOP", "DISABLED" ),
new PublicProperty("AUTO_LAUNCH_PATH", "[|]"),
new PublicProperty("AUTO_LAUNCH_PATH", ""),
new PublicProperty("AUTO_START", "ENABLED"),
new PublicProperty("BRING_TO_FRONT", "DISABLED"),
new PublicProperty("CUSTOM_TITLE_BAR", "ENABLED"),
new PublicProperty("DEV_TOOLS_ENABLED", "true"),
new PublicProperty("FULL_SCREEN", "true"),
new PublicProperty("FULL_SCREEN_CB", "true"),
new PublicProperty("LOCATION", "true"),
new PublicProperty("MEDIA", "true"),
new PublicProperty("MIDI_SYSEX", "true"),
new PublicProperty("MIDI_SYSEX_CB", "true"),
new PublicProperty("MINIMIZE_ON_CLOSE", "ENABLED"),
new PublicProperty("NOTIFICATIONS", "true"),
new PublicProperty("OPEN_EXTERNAL", "true"),
new PublicProperty("OPEN_EXTERNAL_CB", "true"),
new PublicProperty("POD_URL", "https://my.symphony.com"),
new PublicProperty("POINTER_LOCK", "true"),
new PublicProperty("POINTER_LOCK_CB", "true")
new Property("MSIINSTALLPERUSER", "1")
};
// Define the custom actions we want to run, and at what point of the installation we want to execute them.

View File

@@ -22,18 +22,26 @@ namespace Symphony
void dialog_Load(object sender, System.EventArgs e)
{
// Populate the dynamic UI elements that can't be set at compile time (background image and
// Populate the dynamic UI elements that can't be set at compile time (background image and
// the label containing user name)
this.backgroundPanel.BackgroundImage = Runtime.Session.GetResourceBitmap("WixUI_Bmp_Dialog");
this.radioButtonCurrentUser.Text = "Only for me (" + getUserName() + ")";
if( Runtime.Session["ALLUSERS"] != "" )
{
this.radioButtonAllUsers.Checked = true;
}
else
{
this.radioButtonCurrentUser.Checked = true;
}
}
void next_Click(object sender, System.EventArgs e)
{
// To enable Wix to use the "MSIINSTALLPERUSER" property being set below, ALLUSERS must be set to 2
Runtime.Session["ALLUSERS"] = "2";
Runtime.Session["ALLUSERS"] = "2";
if (radioButtonCurrentUser.Checked)
{
// Install for current user
@@ -42,10 +50,10 @@ namespace Symphony
} else if (radioButtonAllUsers.Checked)
{
// Install for all users
Runtime.Session["MSIINSTALLPERUSER"] = ""; // per-machine
Runtime.Session["MSIINSTALLPERUSER"] = ""; // per-machine
Runtime.Session["INSTALLDIR"] = System.Environment.ExpandEnvironmentVariables(@"%PROGRAMFILES%\" + Runtime.ProductName);
}
Shell.GoNext();
}