问题标签 [visual-studio-setup-proje]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
611 浏览

.net - 是否可以让安装项目创建注册表值而不覆盖现有值?

我知道它可以通过自定义操作来完成,但是没有它可以完成吗?

0 投票
1 回答
146 浏览

c# - Adding folder navigation to an msi

I am creating an MSI package for a windows service, untill recently i have always just performed the minimum using the installer class and then manually edited the app.config file afterwards. However, i need to make it easier for the users to carry out an installation themselves and this has meant replacing manual configuration with prompts at install.

I have managed to add a custom action to display a textbox and prompt for a folder destination, as well as ammending the installer to create the folder using the filepath entered into the text box, but i would prefer it if the filepath could be selected by browsing to the folder.

Can anyone suggest a good tutorial or steps to do this, as i am struggling.

Thank you

0 投票
2 回答
2737 浏览

c# - 如何从安装程序获取路径以及如何在我的应用程序中设置?

我正在编写一个 win 应用程序,现在我想为我的应用程序进行设置,我的代码是:

现在如何从安装程序中获取路径来设置它???谢谢。

0 投票
2 回答
4651 浏览

vb.net - Create Event Log Source as part of installation - windows forms app, vs deployment project

I have a vb.net windows form app that I am deploying as using the visual studio deployment project. The app needs to write event logs to the application log in the event viewer. For reasons explained here I need to create the event source during the installation process. Something like this to run as part of the installer

That code needs to be run during the installer with elevated privileges. So my questions are:

  1. How do I execute that code above as part of the installer?
  2. How do I get the installer to do the UAC prompt to allow that code to run as part of the installation?
0 投票
1 回答
8797 浏览

.net - windows Installer 3.1 和 4.5 的区别在创建 SetUP 项目时,选择哪一个

我正在为 Win App 创建安装项目。在 VS2010 框架 4.0

现在在选择先决条件时(从项目属性中获胜)

根据我的项目要求,我有 Microsoft .NET Framework 4(x86 和 x64)。

现在我对选择哪个 Wind Installer 感到困惑

(Windows 安装程序 3.1 / Windows 安装程序 4.5)

它们是基于应用程序将安装的操作系统还是..什么..?

0 投票
1 回答
5684 浏览

visual-studio-2010 - VS2010 Setup Project 强制覆盖文件

到处找,似乎在 VS2010 中,所有选项都被删除了。

我有一个安装项目,其中包含复制到应用程序文件夹的应用程序文件。我想要的是能够覆盖那里的任何现有文件。最终用户可以在更新之间编辑此文件,我需要能够覆盖他们的更改以及向他们发送对这些文件的任何更新。

将文件夹设置为“CreateAlways=True”并不意味着文件夹内容会像我希望/预期的那样被覆盖。它只允许您创建空文件夹。

我试过这个解决方案。显然,这不适用于 2010 年。

我能想到的最简单的事情是能够在这些文件上设置版本号以强制安装规则覆盖旧版本,但我认为这在文本文件等上是不可能的。(此外,它有很多文件,我经常更新)

0 投票
1 回答
1875 浏览

visual-studio - Visual Studio 安装项目 - 从文本框对话框中检索字符串

我正在尝试从 Visual Studio 安装项目中的一个文本框对话框中获取一个值到自定义操作安装程序类中。当有人输入带有空格的字符串时,它似乎不喜欢它。如果用户输入一个没有空格或引号的字符串,我可以毫无问题地检索该字符串。否则我会收到此错误:

初始化安装时发生异常:System.ArgumentException: File Source=localhost;Initial 不存在。如果将此参数用作安装程序选项,则格式必须为 /key=[value]

请注意,该字符串是一个数据库连接,如果我将整个字符串拆分为一个空格,“Source=localhost;Initial”将是第二个标记。我显然在这里遗漏了一些东西,因为我无法想象这是 Visual Studio 的实际限制

0 投票
1 回答
5522 浏览

windows-installer - 如何强制 Visual Studio 安装项目生成的 msi 安装程序仅在管理模式下运行?

我有一个生成 msi 安装程序的 Visual Studio 安装项目。如果我以管理员身份运行安装程序,它可以正常工作。如果它不是以管理员身份运行,我对 HKEY_CURRENT_USER\Software\Microsoft\Office 的更新将失败。

我从项目属性中查看了启动条件、自定义操作和先决条件,但我不知道如何执行此操作。

是否可以创建一个安装,如果它没有以管理权限运行,它将警告用户并失败?

谢谢

0 投票
1 回答
1040 浏览

visual-studio - Visual Studio 安装项目 - 您可以配置项目以正确顺序安装传递依赖项吗?

我正在使用 Visual Studio 2010 为我的项目创建安装程序。我的安装程序包括我的依赖项,例如 .NET 3.5 和 2007 Microsoft Office Primary Interop Assemblies (PIA)。此外,PIA 依赖于 .NET 3.5。

我遇到了一个问题,因为 Visual Studio 2010 无法识别 PIA 对 .NET 3.5 的传递依赖。结果,生成的安装程序可执行文件以错误的顺序安装这些项目,在安装 .NET 之前安装 PIA,从而导致错误。

解决这个问题的最佳方法是什么?有没有办法配置安装项目,以指示这些依赖项的正确顺序?我听说过一些第三方解决方案,比如 Wix,但对于这么简单的事情来说似乎有点过分了。我真的需要使用像 Wix 这样的第三方工具吗?

0 投票
1 回答
234 浏览

windows - 如何在 Visual Studio 安装项目中将安装目录公开为公共属性

我的 Windows 窗体应用程序应该使用msiexec. 我想将安装目录公开为公共属性,以使系统管理员只能使用命令行对其进行更改。与此类似的东西会很好:

Visual Studio 中有没有办法做到这一点?