예제 #1
0
 static void Msi_Load(SetupEventArgs e)
 {
     if (e.IsInstalling)
     {
         MessageBox.Show(e.ToString(), "Load");
     }
 }
예제 #2
0
파일: Program.cs 프로젝트: wzugang/OpenCKMS
 static void Msi_Load(SetupEventArgs e)
 {
     if (!e.IsUISupressed && !e.IsUninstalling)
     {
         MessageBox.Show(e.ToString(), "Load");
     }
 }
예제 #3
0
파일: Program.cs 프로젝트: wzugang/OpenCKMS
 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
파일: Program.cs 프로젝트: wzugang/OpenCKMS
 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
파일: setup.cs 프로젝트: zacronan/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"]);
    }
예제 #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
파일: setup.cs 프로젝트: zacronan/WixSharp
 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");
 }