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

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

问题描述

我已经使用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.

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

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.

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

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