1
我試圖創建一個(希望)使用WIX的簡單安裝程序,但它似乎我在我的智慧結束。我不知道如何指定一個預定義的路徑來安裝我的文件。什麼是安裝程序需要做的是這樣的:使用WIX創建安裝到預定義位置的安裝程序
- 安裝4種字體
- 安裝(複製)的二進制文件和.ini文件到預定義的路徑(「C:\ dvimport」)
- 創建快捷方式到以前的二進制文件
- 運行一個二進制安裝程序(希望捆綁在內)安裝程序。
另外,在旁註中;用戶不應該能夠更改預定義的路徑,導致應用程序將不運行,如果沒有安裝在正確的路徑。
目前我有什麼是這個(其中大部分是預定義的):
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="660d9ab6-dbd9-4440-b56b-8f1c29d9ab86" Name="FDVweb hjelpefiler" Language="1033" Version="1.0.0.0" Manufacturer="CuroTech" UpgradeCode="4283b7c8-0057-4dcc-bfc5-7c06a12cba90">
<Package InstallerVersion="200" Compressed="yes" Keywords="Installer" Description="FDVweb hjelpefiler installasjons-program" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Binary Id="BarCodeDriver" SourceFile="barcode_install.exe" />
<CustomAction Id="InstallBarCodeDriver" BinaryKey="BarCodeDriver" ExeCommand="" Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="FDVweb">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent" Guid="55a9465e-2350-48bc-9786-22a036ea7304"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="FontsFolder">
<Component Id="C128_100" Guid="72E7E1D2-DEE7-4E0B-939F-5460AD432BEF">
<File Id="C128_100.tff" Source="fonts\C128_100.tff" TrueType="yes" />
</Component>
<Component Id="C128_200" Guid="230EE8B3-06F9-4D88-AFF5-3D26AF0741AD">
<File Id="C128_200.tff" Source="fonts\C128_200.tff" TrueType="yes" />
</Component>
<Component Id="C128_300" Guid="3DC98EE5-B969-453E-B4E9-5D5BC1416F24">
<File Id="C128_300.tff" Source="fonts\C128_300.tff" TrueType="yes" />
</Component>
<Component Id="C128_400" Guid="8CFCAFBE-C7B8-46F1-9C6D-ACF2D881BAEE">
<File Id="C128_400.tff" Source="fonts\C128_400.tff" TrueType="yes" />
</Component>
</DirectoryRef>
<Feature Id="Complete" Title="FDVwebInstall" Level="1">
<!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
<!-- <ComponentRef Id="ProductComponent" /> -->
<ComponentRef Id="C128_100" />
<ComponentRef Id="C128_200" />
<ComponentRef Id="C128_300" />
<ComponentRef Id="C128_400" />
<!-- Note: The following ComponentGroupRef is required to pull in generated authoring from project references. -->
<ComponentGroupRef Id="Product.Generated" />
</Feature>
</Product>
</Wix>
我並不需要一個明確的答案,一個鏈接資源說明如何實現我想要什麼會很長的路要走。
所以其位(S)是/不是從你的清單4的工作?另外,如果這個「預定義」的位置沒有和*不能*存在? –
它**可以**總是存在的,因爲如果它不是系統不兼容,然而,這個安裝程序的分佈不夠大,不足以關心(僅限內部使用,受控環境)。如果該文件夾不存在,則應該創建該文件夾。我根本不理解的部分是如何引用絕對路徑,天氣應該嵌套在SourceDir下面或者不嵌套,以及如何設置執行順序(唯一重要的是外部二進制文件最後運行)。 – Alxandr