Hi All,

I write a bootstrapper application and use “WixStandardBootstrapperApplication” 
GUI.

After my bootstrapper application runs a MSI to install device drivers by 
calling a custom action dll 
, it indicates that installation successfully. But after a few seconds, it pops 
up another “Modify Setup”
dialogBox again. I am wondering why this happened.

I checked the log file of the bootstrapper application  and found nothing was 
wrong. What is the reason that
the bootstrapper application pops up “Modify Setup” dialogbox? How do I stop 
the popup of the “Modify Setup”
dialogBox?


Here is the XML code to install and uninstall driver.

<Binary Id="Cleanup.CA.dll" SourceFile="$(var.CleanUp.TargetDir)Cleanup.CA.dll" 
/>

  <CustomAction Id="DoInstall"
                 Return="asyncWait"
                 Execute="immediate"
                 BinaryKey="Cleanup.CA.dll"
                 DllEntry="InstallDrivers" 
                 />

  <CustomAction Id="DoUninstall"
                 Return="asyncWait"
                 Execute="deferred"
                 BinaryKey="Cleanup.CA.dll"
                 DllEntry="UninstallDrivers" />

  <CustomAction Id="DoCleanup"
                 Return="check"
                 Execute="immediate"
                 BinaryKey="Cleanup.CA.dll"
                 DllEntry="DeleteDriverFiles" />

  <InstallExecuteSequence>
    <Custom Action="DoInstall" After="InstallFinalize"> (NOT Installed) 
</Custom>
    <Custom Action="DoUninstall" After="InstallInitialize">Installed AND 
REMOVE="ALL"</Custom>
    <Custom Action="DoCleanup" After="InstallFinalize">Installed AND 
REMOVE="ALL"</Custom>
  </InstallExecuteSequence>    


///Custom Action all

[CustomAction]
   public static ActionResult UninstallService(Session session)
  {
      Process process;
      int result;

      session.Log("Begin to UninstallService");
      try
      {
          if (!bServiceInstalled)
          {
              return ActionResult.SkipRemainingActions;
          }
          string InstallDir = GetInstallationFolder(session);
          if (InstallDir == string.Empty)
          {
              session.Log("WARNING!!! in UninstallService: Service not 
installed");
              return ActionResult.SkipRemainingActions;
          }

          string servicePath = InstallDir + "HishEp.exe";
          session.Log("Exec the following command {0}", servicePath);
          process = System.Diagnostics.Process.Start(servicePath, "/uninstall");
          process.WaitForExit();
          result = process.ExitCode;
      }
      catch (Exception ex)
      {
          session.Log("WARNING!!! in UninstallService: {0}", ex.ToString());
          ShowMessage(session, ex.ToString());
          return ActionResult.Failure;
      }
      return ActionResult.Success;
  }

[CustomAction]
     public static ActionResult InstallDrivers(Session session)
     {
         session.Log("Begin to InstallDrivers");
         try
         {
             string InstallDir = GetInstallationFolder(session);
             if (InstallDir == string.Empty)
             {
                 session.Log("WARNING!!! in InstallDrivers: Service not 
installed");
                 return ActionResult.SkipRemainingActions;
             }
             string UninstallBuffer = "DefaultInstall 128 ";
             string SockInfBuffer = UninstallBuffer + InstallDir + 
SOCKMON_INF_NAME;
             string FileFilterInfBuffer = UninstallBuffer + InstallDir + 
MINISPY_INF_NAME;

             session.Log("InstallDrivers: start to install socket monitor 
driver {0}", SockInfBuffer);
             InstallHinfSection(IntPtr.Zero, IntPtr.Zero, SockInfBuffer, 0);

             session.Log("InstallDrivers: start to install file filter driver 
{0}", FileFilterInfBuffer);
             InstallHinfSection(IntPtr.Zero, IntPtr.Zero, FileFilterInfBuffer, 
0);
         }
         catch (Exception ex)
         {
             session.Log("WARNING!!! in InstallDrivers: {0}", ex.ToString());
             ShowMessage(session, ex.ToString());
             return ActionResult.Failure;
         }
         return ActionResult.Success;
     }
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to