面向所有用户的VS.NET MSI安装程序项目中的安装快捷方式 [英] Install shortcut from VS.NET MSI installer project for ALL USERS

查看:127
本文介绍了面向所有用户的VS.NET MSI安装程序项目中的安装快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这里搜索和搜索.我已经尝试了以下方法,但是没有运气:

I've searched and searched on here. I've tried the following methods with no luck:

将项目安装程序的属性设置为-InstallforAllUsers(不记得确切的名称),但这确实为所有用户菜单添加了快捷方式,但是只有安装了该应用程序的用户才能运行它.其他用户收到有关无法安装SysWOW64或类似内容的错误.

Set the project installer properites to - InstallforAllUsers (can't remember the exact name) but that does add the shortcut to all the user's menus, but only the user that installed the application is able to run it. The other users get a SysWOW64 error about not being able to install it or something.

再次设置[DesktopFolder]或[AllUserStartMenu],我可能没有正确的这些属性名称,但是我从发布在此处的一些用户关注了它们.为这些属性赋予ALLUSERS的值.安装程序在安装过程中失败,并显示无法找到网络位置1"或类似内容.

Set the [DesktopFolder] or [AllUserStartMenu] again, I may not have these property names right, but I followed them from a few users that have posted on here. Giving these properties the value of ALLUSERS. The installer fails during install and says "Unable to locate network location 1" or something like that.

使用ORCA编辑MSI文件并添加要为所有用户安装的属性,但在ORCA内部失败,出现无法添加属性的错误.

Used ORCA to edit the MSI file and add a property to install for all users, and failed inside ORCA with the error of unable to add property.

这太疯狂了.我正在使用Visual Studio2010.我想我只是在推动Instller的极限.我的安装是一个桌面应用程序(winforms),具有一个自定义安装程序操作和一个类,该类根据用户在安装过程中做出的选择将某些值写入到设置文件中(自定义UI安装程序屏幕).

It's maddening. I'm using Visual Studio 2010. I think I'm just pushing the limits of the instller.. imagine that. My install is a desktop application (winforms) that has a custom installer action and class that writes some values to a setting file on choices the user makes during the install (custom UI installer screen).

有什么想法吗?

推荐答案

我知道这是一个古老的问题,但是我以前做过这个,最近一次又不得不做的时候,我却忘记了如何做.由于我的直觉是在深入研究旧的安装程序项目之前先研究一下SO,所以我认为最好将答案发布出来.

I know this is an ancient question, but I've done this before and when I recently had to do it again I had forgotten how. Since my gut instinct was to look on SO before digging into old installer projects, I figured I'd better get the answer posted.

这是我如何做到这一点:

Here is how I accomplish this:

  1. 在启动条件中添加注册表搜索:

  1. Add a registry search to your launch conditions:

  • (名称):搜索所有用户程序菜单
  • 属性:ALLUSERSMENU
  • RegKey:SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Shell文件夹
  • 根:vsdrrHKLM
  • 值:通用程序

在文件系统编辑器中创建一个新的目标文件夹,并利用您的新属性:

Create a new target folder in the file system editor and leverage your new property:

  • (名称):所有用户程序"菜单
  • AlwaysCreate:True
  • 默认位置:[ALLUSERSMENU] \ YourMenuHere
  • 属性:菜单位置
  • 传递性:错误

将快捷方式放置在该新文件夹中.

Place your shortcuts in that new folder.

就是这样.

以下是可供参考的Windows XP注册表中可以访问的文件夹路径:

For reference here are the folder paths you can access in the registry for Windows XP:

,对于Windows 7:

and for Windows 7:

这篇关于面向所有用户的VS.NET MSI安装程序项目中的安装快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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