我有一个简单的“Hello world”窗体应用程序(在VS-2013中创建)。
如何使用WIX Toolset使应用程序在Windows启动时自动启动?
必须在Windows7和Windows8中运行。
这是我目前拥有的Product.wxs文件。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Installer" Language="1033" Version="1.0.0.0" Manufacturer="DMC" UpgradeCode="808c333f-09f7-45d5-a5ab-ea104c500f2b">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="Installer" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="HelloWorld" />
</Directory>
<Directory Id="StartupFolder">
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Guid="{A4744AE7-211C-42A0-887D-1701D242776C}">
<File Source="$(var.HelloWorld.TargetPath)" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
编辑:
感谢您的帮助,但对我来说还不够好。在哪里添加这些标签?我应该创建快捷方式,还是wix会为我做到这一点?我需要将快捷方式包含在wix中,如何操作?我需要将.ico文件包含在wix项目中,如何操作?我需要逐步解释才能理解这个问题。最好提供Hello World项目示例的Whole Product.wxs。
编辑2:
我仍然不知道如何使用wix解决这个问题。我采用了不同的方法:如何在Windows启动时运行C#应用程序?