WiX工具集(以前称为Windows Installer XML)是一个工具集,可以从XML源代码构建Windows安装包和WiX引导程序。该工具集支持一个命令行环境,开发人员可以将其集成到他们的构建过程中,以构建MSI和MSM安装程序包以及EXE引导程序。对于基于云的Web开发平台,请使用[wixcode]标记。
<Shortcut Name="Tray Application" Directory="StartupFolder" WorkingDirectory="InstallFolder" Advertise="yes" Icon="Icon.ico" /> icon的定义是这样的: <Icon Id="Icon.ico" SourceFile="Resources\Icon.ico" /> 在任务管理器 - > autostart它像这样显示: 为什么它以“ ICON.ICO”的形式显示,而不是任务管理器中的“托盘应用程序” - > autostart? C:\ programData \ Microsoft \ Windows \ Windows \ start菜单\ program \ startup它显示的喜欢: shortcut属性: 反广告快捷方式使用图标的ID,因为部署时它们无法访问目标文件名。因此,将图标ID更改为您要显示的名称,例如“ myApplication.exe”。
如何修复Wix设置的升级逻辑,然后将installScope更改为“ Permachine”
我们使用Wix为我们的应用程序创建设置。对于用户已经安装了我们应用程序较旧版本的情况,我们使用MaparUpgrade XML元素进行了重大升级。这个...
这完全按照预期的方式工作,直到我再次启动应用程序之前,一切似乎都很好。然后“请等待Windows配置[AppName]” Windows出现,显然它还原第二个应用程序。然后循环继续进行。
MMSI/WIX安装程序 - 如何防止在安装过程中删除目录?
我们为我们的项目OpenRGB创建了一个Wix安装程序,我遇到了一个问题。 我希望能够分发具有自己的Wix安装程序的OpenRGB插件。 主要申请
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> 后来我有 <BootstrapperApplication> <bal:WixStandardBootstrapperApplication LicenseFile="$(var.BuildResourceSource)\!(loc.Culture)\Licence.rtf" Theme="rtfLicense"/> 当我编译时,我得到了 error WIX0200: The BootstrapperApplication element contains an unhandled extension element 'WixStandardBootstrapperApplication'. Please ensure that the extension for elements in the 'http://wixtoolset.org/schemas/v4/wxs/bal' namespace has been provided. I将库作为依赖项包括在包装缓存中。 有人可以指出我需要做的事情吗? 谢谢你 adding<Target Name="CollectSuggestedVisualStudioComponentIds" /> 项目文件似乎已经治愈了
您会致电API端点以将联系人添加到一个段中。我知道段ID,因为当我查询联系人时,我可以看到。我通过在Wix仪表板中查看源来匹配段。 AI会...
C#wix:注册我的ASP.NET核心应用程序作为Windows Service with Wixinstaller
我试图让我的Wix安装程序在安装过程中注册我的ASP.NET Core应用程序作为Windows服务。 program.wsx的一部分: <Fragment> <Component Id="WindowsServiceComponent" Guid="B1234567-89AB-CDEF-0123-456789ABCDEF" Directory="INSTALLFOLDER"> <File Id="MyServiceExe" Source="C:\Navcon\net8.0\win-x64\NAV.LocalService.Function.exe" KeyPath="yes"/> <!-- Register as Windows Service --> <ServiceInstall Id="MyAspNetCoreServiceInstall" Name="Nav.LocalService" DisplayName="My ASP.NET Core Service" Description="Runs the ASP.NET Core Web API as a Windows Service" Start="auto" Type="ownProcess" ErrorControl="ignore" Account="NT AUTHORITY\NetworkService" /> <!-- Ensure service starts after installation --> <ServiceControl Id="MyAspNetCoreServiceControl" Name="Nav.LocalService" Start="install" Stop="both" Remove="uninstall" Wait="yes" /> </Component> 但在安装过程中,我会得到此错误: 当然,它确实在安装期间要求我为Admin Prev。我单击“作为管理员”,但这似乎没有帮助。 任何可能出了什么问题的想法? 这是我的program.cs: var builder = WebApplication.CreateBuilder(args); int freePort = 0; // Load default settings builder.Configuration .AddJsonFile("local.settings.json", optional: false, reloadOnChange: true) .AddEnvironmentVariables(); builder.Host.UseWindowsService(options => { options.ServiceName = "Nav.LocalService"; // MUST MATCH WiX ServiceInstall Name }); // Determine user-specific settings file path in AppData var appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var userSettingsFilePath = Path.Combine(appDataPath, "LocalService", "local.settings.json"); if (File.Exists(userSettingsFilePath)) { // if we have a local file for each user, take this instead and leave the other one as backup builder.Configuration.AddJsonFile(userSettingsFilePath, optional: true, reloadOnChange: true); } else { // copy local file if it doenst already exist // Ensure the directory exists var directoryPath = Path.GetDirectoryName(userSettingsFilePath); if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(directoryPath); } var sourceFilePath = Path.Combine(Directory.GetCurrentDirectory(), "local.settings.json"); var fileContent = File.ReadAllText(sourceFilePath); // Read the content of the existing file File.WriteAllText(userSettingsFilePath, fileContent); builder.Configuration.AddJsonFile(userSettingsFilePath, optional: true, reloadOnChange: true); Thread.Sleep(100); } var getLastUsedPort = builder.Configuration["Values:Application:FunctionAppPort"]; builder.Services .AddHttpClient() .AddTransient<NTLMRegisterSender>() .AddTransient<PrintDocumentAction>() .AddTransient<OpenDocumentAction>() .AddTransient<SaveDocumentAction>() .AddSingleton<LoginStateModel>() .AddTransient<RegisterController>() .AddSingleton<NtlmRequestSenderService>() .AddHostedService<NtlmRequestSenderService>() .AddHostedService<EndpointTriggerService>() .AddControllers(); var app = builder.Build(); if (String.IsNullOrEmpty(getLastUsedPort)) { // no old port available get a new one freePort = Converters.GetFreePort(); var updater = new ConfigUpdater(); updater.UpdateConfig("Application:FunctionAppPort", freePort.ToString()); } else { // we had a port already, check if its free var portStillFree = Converters.IsPortAvailable(int.Parse(getLastUsedPort)); if (!portStillFree) { // port is no longer free, retrieve new one, write to config and update on BC freePort = Converters.GetFreePort(); var updater = new ConfigUpdater(); updater.UpdateConfig("Application:FunctionAppPort", freePort.ToString()); //Update new port on BC using (var scope = app.Services.CreateScope()) { var ntlmRegisterSender = scope.ServiceProvider.GetRequiredService<NTLMRegisterSender>(); await ntlmRegisterSender.UpdateFieldValue("Port", freePort.ToString()); } } else { // do nothing, leave everythign as it is } } var logger = app.Services.GetRequiredService<ILogger<Program>>(); // Hide the console window HideConsoleWindow(); app.UseRouting(); app.MapControllers(); Thread.Sleep(1000); string uripath = builder.Configuration["Values:Application:FunctionAppUrl"] ?? "http://localhost:"; uripath += builder.Configuration["Values:Application:FunctionAppPort"] ?? "7072"; string trayAppPath = Converters.GetPathToWPFApp(builder.Configuration["TrayAppPath"]); try { Process.Start(trayAppPath, uripath); logger.LogInformation("Successfully started the tray app."); } catch (Exception ex) { logger.LogWarning(ex, "Could not start the tray app. Check local.settings.json for the correct path."); } try { app.Run(uripath); } catch (Exception ex) { Console.WriteLine($"Failed to start server: {ex.Message}"); } void HideConsoleWindow() { IntPtr handle = GetConsoleWindow(); if (handle != IntPtr.Zero) { ShowWindow(handle, 0); } } [DllImport("kernel32.dll")] static extern IntPtr GetConsoleWindow(); [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); 显示该错误对话框时,请尝试使用开始您的服务 net start Nav.LocalService 您的服务将无法启动,现在您需要调试原因(例如,缺少文件,或者您的服务中存在错误,或其他内容)。 关于不成为管理员的实际消息(几乎)永远是不正确的,我希望Windows Installer不使用它。 99.999%的时间在您的服务代码中的某个地方。
我有一个Wix项目,目前正在将我的二进制.exes标记为字体,因此我对每个EXE都有一些X78警告。这是myFragment.wxs中的一个这样的文件条目: 我有一个Wix项目,目前正在将我的二进制.exes标记为字体,因此我对每个EXE都有一些X78警告。这是myFragment.wxs中的一个这样的文件条目: <Component Id="cmp20F34700D8DCC8F37E1363B995D59CB4" Guid="{DA56982D-9BBD-4682-A550-6E87648B7780}"> <File Id="filCE1CE5FF129A484DCCC047B9EB23D067" KeyPath="yes" Source="C:\myInstall\Release\EGPWS\EASE-2.3.1\Bin\TaskT.exe" /> </Component> 这是WIX安装程序构建日志的示例警告: C:\Tools\mystuff\Installers\apple\myFragment.wxs(1947): warning LGHT1076: ICE60: The file filCE1CE5FF129A484DCCC047B9EB23D067 is not a Font, and its version is not a companion file reference. It should have a language specified in the Language column. [C:\Tools\mystuff\Installers\apple\xyz.wixproj] 这些似乎是Matplotlib的TTF字体文件: <File Id="fil87B94718DF0A1E5F96CF5A83CADE52B9" KeyPath="yes" Source="C:\install_loc\Official\Release\Python\Lib\xyz-packages\matplotlib\mpl-data\fonts\ttf\cmb10.ttf" /> <File Id="fil30E628AF81327D8B4C15F0660D7DAC46" KeyPath="yes" Source="C:\install_loc\Official\Release\Python\Lib\xyz-packages\matplotlib\mpl-data\fonts\ttf\cmex10.ttf" /> <File Id="filDFA0B345DC913891B6C694A78C298511" KeyPath="yes" Source="C:\install_loc\Official\Release\Python\Lib\xyz-packages\matplotlib\mpl-data\fonts\ttf\cmmi10.ttf" /> <File Id="fil960ABA453AF97464A28824CC077B6584" KeyPath="yes" Source="C:\install_loc\Official\Release\Python\Lib\xyz-packages\matplotlib\mpl-data\fonts\ttf\cmr10.ttf" /> 我们正在使用Wix工具3.14 我认为这是Wix的错误,但我能够从这里为我们找出解决方案: WIX -ICE60和ICE69警告 特别地,您将这两个冲压标签添加到<PropertyGroup>中。上面的链接显示了如何在Visual Studio中完成的。 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>bin\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <SuppressValidation>True</SuppressValidation> <SuppressIces>ICE60</SuppressIces> </PropertyGroup> 您误读错误消息: ICE60:文件filce1ce5ff129a484dcccccccccccc047b9eb23d067 is andnota font,其版本不是伴随文件参考。它应该在语言列中指定语言。 光明是我的。错误消息告诉您,您的EXE文件缺少语言资源,这是不寻常的。 ICE60是来自Microsoft的Windows Installer团队的静态分析工具,并在发货前试图捕获错误。 我的猜测是,您应该给您的.exe一个适当的语言资源。
我有一个Wix项目,目前正在将我的二进制.exes标记为字体,因此我对每个EXE都有一些X78警告。这是myFragment.wxs中的一个这样的文件条目:
这是WIX安装程序构建日志的示例警告: C:\Tools\mystuff\Installers\apple\myFragment.wxs(1947): warning LGHT1076: ICE60: The file filCE1CE5FF129A484DCCC047B9EB23D067 is not a Font, and its version is not a companion file reference. It should have a language specified in the Language column. [C:\Tools\mystuff\Installers\apple\xyz.wixproj] 我们正在使用Wix工具3.14 我认为这是Wix的错误,但我能够从这里为我们找出解决方案: WIX -ICE60和ICE69警告 特别是您将这两个层压标签添加到中 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>bin\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <SuppressValidation>True</SuppressValidation> <SuppressIces>ICE60</SuppressIces> </PropertyGroup>
我需要使安装程序显示一个文件夹选择对话框。使用标准的WixUI_InstallDir序列,这很容易,但它也表示我不需要的许可证对话框。 删除此对话框sho ...
<Property Id="EULATEXT" Value="!(loc.EulaInt)" /> ... <Control Id="LicenseText" Type="ScrollableText" X="18" Y="105" Width="348" Height="120" TabSkip="no" Sunken="yes"> <Text Value="[EULATEXT]" /> </Control> 它显示一个空字段。任何帮助将不胜感激 windows安装程序文档的ScrollableText表示不支持。 注意,与此控件一起使用的文本字符串不能包含嵌入式属性。显示具有嵌入式属性的文本,而是使用文本控制。
wixtargetSimports设置在哪里? “必须安装Wix Toolset v3.11构建工具才能构建此项目。”
当我与Wix创建合并模块时,Wixproj文件具有 当我与Wix创建合并模块时,Wixproj文件 <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " /> <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> <Error Text="The WiX Toolset v3.11 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset.org/releases/v3.11/stable" /> </Target> the末端。我做了一个回声,这就是我回来的 WixTargetsPath: MSBuildExtensionsPath32: C:\Program Files\dotnet\sdk\9.0.101 WixTargetsImported: 我得到了The WiX Toolset v3.11 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset.org/releases/v3.11/stable,但是我安装了WiX 3.14和WiX v3 Visual Studio 2022 extension。 错误仅发生在dotnet命令期间(清洁,构建,还原)。但是当我做一个Visual Studio Build/Rebuild Solution时不是 WixV3不支持dotnet命令的现代构建要求。 Wix V3是在2009年设计的,就在梦dream以求的任何东西之前。 :) 您需要移至Wix V4+,它是现代SDK风格的目标,它完全支持dotnet build.。
given: Powershell 5.1 有人可以帮助我从MSI文件中提取元数据吗? 我尝试了以下内容,但没有评论属性。 $ filepath =“ c:\ users \ user1 \ source epos \练习\ wpfapp1 \