Hi,
I wrote a simple demo for your requriement. You can modify it according to
your needs.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="ae1121b1-e0dd-47d3-88e8-0ce206d448bf" Name="WixExample"
Language="1033" Version="1.0.0.0" Manufacturer="WixExample"
UpgradeCode="0a166a61-33bd-4062-b88f-4dc27cc91a42">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<!-- make sure that .netframework 3.5 is installed -->
<Condition Message="This application requires .NET Framework 3.5. Please
install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK35]]>
</Condition>
<!-- administrator to install -->
<Condition Message="You need to be an administrator to install this
product.">
Privileged
</Condition>
<!-- Directory -->
<!-- set directory to Windows/System32-->
<SetDirectory Id="SYSTEMFOLDER" Value="[SystemFolder]"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="SYSTEMFOLDER">
<!-- replace WixExample to you folder name -->
<Directory Id="INSTALLLOCATION" Name="WixExample">
</Directory>
</Directory>
</Directory>
<!-- registry entry -->
<DirectoryRef Id="TARGETDIR">
<Component Id="RegistryEntries" Guid="PUT-GUID-HERE">
<RegistryKey Root="HKCU"
Key="Software\Microsoft\MyApplicationName"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="integer" Name="SomeIntegerValue" Value="1"
KeyPath="yes"/>
<RegistryValue Type="string" Value="Default Value"/>
</RegistryKey>
</Component>
</DirectoryRef>
<!-- your install source files -->
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="Component1" Guid="PUT-GUID-HERE">
<File Id="File1" Source=""/>
</Component>
</DirectoryRef>
<Feature Id="ProductFeature" Title="WixExample" Level="1">
<ComponentRef Id="RegistryEntries"/>
<ComponentRef Id="Component1"/>
</Feature>
</Product>
</Wix>
See more through wix tutorial and documentations.
2009-11-17
salever.lee
发件人: Elene Sanston
发送时间: 2009-11-17 06:27:53
收件人: wix-users
抄送:
主题: [WiX-users] Example Help Needed
I just started working with WiX and it seems like an amazing piece of software.
I am hoping that someone could write an example wsx file for me that does the
tasks below. I urgently need to replace a batch file with an installer because
of the unreliability of a batch file. If someone could write an example for me
that does the following I would be very thankfull.
Need the installer to:
Check that .NET 3.5 is installed
Create folder named myfiles under system32
Unregister files in the myfiles folder if they already exist.
Copy new files to system32\myfiles and regsvr32 them.
Add a registry entry.
Have the program show up in add/remove programs and be uninstallable.
Thanks so much for the help! This will really help me understand if I have an
example and can modify it to my needs.
Thanks!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users