Generating an executable using wix
Asked Answered
S

2

9

I am learning Wix and I want to generate a setup.exe file instead of a setup.msi.

Is that possible?

Spruce answered 12/1, 2010 at 2:33 Comment(0)
V
16

A setup EXE is usually referred to as a bootstrapper or chainer. WiX 3.5 will ship with an executable called burn.exe, unfortunately this is still under heavy development.

If you're just after a basic self-extracting EXE with no additional logic you can use the included setupbld.exe with WiX. However it's pretty limited and only includes the most basic functionality.

Alternatively, 7-zip includes basic functionality for creating a setup.exe from an existing MSI. You will need to install the SFXs for installers addon first.

If you're after additional logic, dependency checking, etc. there are loads of alternatives. Personally I use IRMakeBootstrap, but have heard very good things about dotNetInstaller on the wix-users mailing list.

Veradis answered 12/1, 2010 at 3:46 Comment(0)
C
0
step 1.Create window application
step 2. Add setp project
step 3. Add reference
1.WixNetFxExtension.dll
2.WixNetFxExtension.dll
3.WixNetFxExtension.dll

  step 4. Add folowing code
  <Component Id="ProductComponent">
     <File Id="installation"  
    source="E:\MyWork\WindowsFormsApplication2\
    WindowsFormsApplication2\bin\Debug/
    WindowsFormsApplication2.exe"/>
    <!-- TODO: Insert files, registry keys, and other 
      resources here. -->
     </Component>

   step 5. <Property Id="WIXUI_INSTALLDIR" 
    Value="INSTALLFOLDER" ></Property>
    <UIRef Id="WixUI_InstallDir"/>

   step 6.
   <Directory Id="DesktopFolder" Name="Desktop"/>
   <Directory Id="INSTALLFOLDER" Name="SetupProject1" 
    />
     step 7.  <ComponentRef 
       Id="ApplicationShortcutDesktop"/>


   step 8.<Fragment>
    <DirectoryRef Id="DesktopFolder">
  <Component Id="ApplicationShortcutDesktop" 
   Guid="cde1e030-eb64-49a5-b7b8-400b379c2d1a">
    <Shortcut Id="ApplicationDesktopShortcut" 
     Name="SetupProject1" Description="SetupProject1" 
     Target=". 
    [INSTALLFOLDER]WindowsFormsApplication2.exe" 
      WorkingDirectory="INSTALLFOLDER" />
    <RemoveFolder Id="RemoveDesktopFolder" 
     Directory="DesktopFolder" On="uninstall" />
    <RegistryValue Root="HKCU" 
     Key="Software\SetupProject1" Name="installed" 
      Type="integer" Value="1" KeyPath="yes" />
  </Component>
 </DirectoryRef>
</Fragment>

step 9.build and install setup
Coronograph answered 2/10, 2021 at 7:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.