示例#1
0
 static void Msi_Load(SetupEventArgs e)
 {
     if (e.IsInstalling)
     {
         MessageBox.Show(e.ToString(), "Load");
     }
 }
示例#2
0
 static void Msi_Load(SetupEventArgs e)
 {
     if (!e.IsUISupressed && !e.IsUninstalling)
     {
         MessageBox.Show(e.ToString(), "Load");
     }
 }
示例#3
0
 static void Msi_AfterInstall(SetupEventArgs e)
 {
     if (!e.IsUISupressed && !e.IsUninstalling)
     {
         MessageBox.Show(e.ToString(), "AfterExecute");
     }
 }
示例#4
0
 static void Msi_BeforeInstall(SetupEventArgs e)
 {
     if (e.IsInstalling)
     {
         MessageBox.Show(e.ToString(), "BeforeInstall");
     }
 }
示例#5
0
 static void Msi_BeforeInstall(SetupEventArgs e)
 {
     if (!e.IsUISupressed && !e.IsUninstalling)
     {
         MessageBox.Show(e.ToString(), "BeforeInstall");
     }
 }
示例#6
0
文件: setup.cs 项目: Eun/WixSharp
    static void project_Load(SetupEventArgs e)
    {
        try
        {
            SetEnvVErsion(e.Session);

            if (string.IsNullOrEmpty(e.Session["INSTALLDIR"])) //installdir is not set yet
            {
                string installDirProperty = e.Session.Property("WixSharp_UI_INSTALLDIR");
                string defaultinstallDir = e.Session.GetDirectoryPath(installDirProperty);

                e.Session["INSTALLDIR"] = System.IO.Path.Combine(defaultinstallDir, Environment.UserName);
            }
        }
        catch { }
        MessageBox.Show(e.ToString(), "Load " + e.Session["EnvVersion"]);
    }
示例#7
0
文件: setup.cs 项目: csuffyy/wixsharp
    static void project_Load(SetupEventArgs e)
    {
        var msi = e.MsiFile;

        SetEnvVersion(e.Session);

        //MSI doesn't preserve any e.Session properties if they are accessed from deferred actions (e.g. project_AfterInstall)
        //Wix# forces some of the properties to be persisted (via CustomActionData) by using user defined
        //project.DefaultDeferredProperties ("INSTALLDIR,UILevel" by default).
        //Alternatively you can save any data to the Wix# specific fully persisted data properties "bag" SetupEventArgs.Data.
        //SetupEventArgs.Data values can be set and accesses at any time from any custom action including deferred one.
        var conn = @"Data Source=.\SQLEXPRESS;Initial Catalog=RequestManagement;Integrated Security=SSPI";

        e.Data["persisted_data"] = conn;

        MessageBox.Show(e.ToString(), "Load " + e.Session["EnvVersion"]);
    }
示例#8
0
文件: setup.cs 项目: csuffyy/wixsharp
 static void project_AfterInstall(SetupEventArgs e)
 {
     //Note AfterInstall is an event based on deferred Custom Action. All properties that have
     //been pushed to e.Session.CustomActionData with project.DefaultDeferredProperties are
     //also set as environment variables just before invoking this event handler.
     //Similarly the all content of e.Data is also pushed to the environment variables.
     MessageBox.Show(e.ToString() +
                     "\npersisted_data = " + e.Data["persisted_data"] +
                     "\nEnvVar('INSTALLDIR') -> " + Environment.ExpandEnvironmentVariables("%INSTALLDIR%My App.exe") +
                     "\nADDLOCAL = " + e.Session.Property("ADDLOCAL"),
                     caption: "AfterExecute ");
     try
     {
         System.IO.File.WriteAllText(@"C:\Program Files (x86)\My Company\My Product\Docs\readme.txt", "test");
     }
     catch { }
 }
示例#9
0
    static void project_Load(SetupEventArgs e)
    {
        try
        {
            SetEnvVErsion(e.Session);

            if (string.IsNullOrEmpty(e.Session["INSTALLDIR"])) //installdir is not set yet
            {
                string installDirProperty = e.Session.Property("WixSharp_UI_INSTALLDIR");
                string defaultinstallDir  = e.Session.GetDirectoryPath(installDirProperty);

                e.Session["INSTALLDIR"] = System.IO.Path.Combine(defaultinstallDir, Environment.UserName);
            }
        }
        catch { }
        MessageBox.Show(e.ToString(), "Load " + e.Session["EnvVersion"]);
    }
示例#10
0
 static void project_AfterExecute(SetupEventArgs e)
 {
     //Debugger.Launch();
     MessageBox.Show(e.ToString(), "AfterExecute");
 }
示例#11
0
文件: setup.cs 项目: csuffyy/wixsharp
 static void project_BeforeInstall(SetupEventArgs e)
 {
     MessageBox.Show(e.ToString(), "BeforeInstall");
 }
示例#12
0
 static void project_Load(SetupEventArgs e)
 {
     //Debugger.Launch();
     //e.Result = ActionResult.UserExit;
     MessageBox.Show(e.ToString(), "Load");
 }
示例#13
0
 static void project_BeforeExecute(SetupEventArgs e)
 {
     MessageBox.Show(e.ToString(), "BeforeInstall");
     //e.Result = ActionResult.Failure;
     //e.Result = ActionResult.UserExit;
     //e.Result = Microsoft.Deployment.WindowsInstaller.ActionResult.UserExit;
 }
示例#14
0
 static void project_BeforeInstall(SetupEventArgs e)
 {
     MessageBox.Show(e.ToString(), "BeforeInstall " + AppSearch.GetProductVersionFromUpgradeCode(e.UpgradeCode));
 }
示例#15
0
文件: setup.cs 项目: Eun/WixSharp
 static void project_AfterInstall(SetupEventArgs e)
 {
     MessageBox.Show(e.ToString(), "AfterExecute");
 }
示例#16
0
 static void project_AfterInstall(SetupEventArgs e)
 {
     MessageBox.Show(e.ToString(), "AfterExecute");
 }
示例#17
0
文件: setup.cs 项目: Eun/WixSharp
 static void project_BeforeInstall(SetupEventArgs e)
 {
     MessageBox.Show(e.ToString(), "BeforeInstall");
 }
示例#18
0
 static void project_BeforeInstall(SetupEventArgs e)
 {
     MessageBox.Show(e.Session.GetMainWindow(), e.ToString(), "BeforeInstall");
 }