使用 Visual Studio 创建 MSI 并强制执行所有用户 [英] Create MSI and Enforce All Users with Visual Studio

查看:9
本文介绍了使用 Visual Studio 创建 MSI 并强制执行所有用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio 2015(带有 Visual Studio 安装程序插件)创建了一个安装程序.目标是始终使用相同的本地资源运行 APP,无论谁登录,因此我们的目标是 [CommonAppDataFolder](Win10 上的 C:ProgramData...).安装程序可以很好地将所有共享资源放置在我们想要的位置.但是生成的 MSI 提供了安装为所有人"或只是我"的选项

I have created an installer using Visual Studio 2015 (with the Visual Studio installer addon). The goal is to always run the APP with the same local resources, regardless of who is logged on, therefore we target [CommonAppDataFolder] (C:ProgramData... on Win10). The installer works just fine placing all shared resources where we want them. But the generated MSI provides the option to install as "everyone" or just the "just me"

我们希望将安装选项设置为只有我".作为 MSI 的构建过程的一部分,有没有办法在 Visual Studio 中执行此操作.

We want to grey out the option to install as "just me". Is there a way to do this from within Visual Studio as part of the build process for the MSI.

我看到一些涉及使用不同参数运行 MSIEXEC 的解决方案,例如 ALLUSERS,但我想知道是否有办法将其设置为在 Visual 中自动发生工作室.

I see some solutions that involve running MSIEXEC with different parms eg, ALLUSERS, but I am wondering if there is a way to set this up to occur automatically in Visual Studio.

谢谢.

推荐答案

通过在解决方案资源管理器中选择项目,然后 F4,可以显示项目属性窗口(非属性).您可以在那里将 InstallAllUsers 设置为 True.

The project Properties window (NOT properties) can be shown by selecting the project in Solution Explorer, and then F4. You can set InstallAllUsers to True there.

InstallFolder 对话框的属性窗口有一个设置 InstallAllUsersVisible,所以只需将它设置为 False.

The Properties window of the InstallFolder dialog has a settting InstallAllUsersVisible, so just set that to False.

这篇关于使用 Visual Studio 创建 MSI 并强制执行所有用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆