织梦CMS - 轻松建站从此开始!

欧博ABG官网-欧博官方网址-会员登入

How to : 皇冠Making a program start on Windows start

时间:2025-11-23 01:33来源: 作者:admin 点击: 3 次
I haven't had the time to test the structure, in my Wix Directory project at home, but from the top of my head the directory structure should look som

I haven't had the time to test the structure, in my Wix Directory project at home, but from the top of my head the directory structure should look something like this

<Directory> <Directory> <Directory .. > <Component ... > <File ... > <Shortcut Directory="StartupFolder" ...> <Icon ... /> </Shortcut> </File> </Component> </Directory> <!-- ADD THIS --> <Directory ...> <Directory ... /> </Directory> </Directory> </Directory>

** UPDATE **

By default, the Fragment containing the Directory structure is right after the product element.

In the Fragment that declares the directory structure required for your installation, you will add the directory reference to the Start Up folder under windows.

After, you must create the component that will instruct it to take a file and create a ShortCut in the directory that you pass as reference (Start Up Folder).

When the installer launches, it will copy the short cut to the file specified in the directory that you referenced.

** FROM YOUR SOURCE **

In the fragment that has your product components add this declaration

<DirectoryRef> <Component Guid="{BCC2E481-53AF-4690-912D-1051B930B910}"> <Shortcut Description="DMC HELLO" WorkingDirectory="INSTALLDIR" /> <RegistryKey Root="HKLM" Key="DMC\HelloWorld" Action="createAndRemoveOnUninstall"> <RegistryValue Type="integer" Value="1" KeyPath="yes" /> </RegistryKey> </Component> </DirectoryRef>

In the Feature tag under product add the reference to your new component so now your product declaration will look like this

<Product Language="1033" Version="1.0.0.0" Manufacturer="DMC" UpgradeCode="808c333f-09f7-45d5-a5ab-ea104c500f2b"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate /> <Feature Level="1"> <ComponentGroupRef /> <ComponentGroupRef /> </Feature> </Product>

That will copy a shortcut to your start-up folder for your machine.

ADJUSTMENTS

This:

<ComponentGroupRef />

Should Be

<ComponentRef />

This:

<!-- ADD THIS --> <Directory ...> <Directory ... /> </Directory>

Should be:

<Directory ...> </Directory>

That should fix your two errors

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-11-23 20:11 最后登录:2025-11-23 20:11
栏目列表
推荐内容