VS Setup Project以另一个用户身份运行自定义操作 [英] VS Setup Project runs custom action as another user

查看:165
本文介绍了VS Setup Project以另一个用户身份运行自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我创建了一个.Net应用程序,现在我要为它创建一个安装文件,所以我开始使用VS安装项目。安装这个应用程序时,我需要创建一些注册表项(只是保持这似乎不可能用setup
项目本身创建它们)所以我在提交阶段添加了一个自定义操作,运行.exe文件来创建这些注册表中的密钥和安装证书... 

i have created an .Net application and now i am about create a setup file for it, so i started with a VS setup project. while installing this application i need to create some registry keys (just keep that that was not seem possible to create them with setup project itself) so i added a custom action on commit stage that runs an .exe file to create these keys in registry and also install a certificate and ... 

问题是当安装程序运行自定义操作时,.exe文件执行其所有作业,但它不会创建注册表HKCU蜂巢中的钥匙,虽然它在HKLM蜂巢中创造了一些钥匙。似乎安装程序以另一个用户运行自定义操作,而不是尝试安装应用程序的用户
。 

the problem is while installer runs the custom action, the .exe file does all its jobs, but it does not create registry keys in HKCU hive, although its creating some keys in HKLM hive. it seems that installer runs the custom action as another user rather that the user who is trying to install the application. 

注意:我已经阅读了VS文档上的内容已经提到,在Commit阶段运行自定义操作时,"msirunmode"更改为"runmode_commit"。 

note: i have read somthing on VS documents also that has mentiond that while running custom action in Commit stage the "msirunmode" is change to "runmode_commit". 

如何更改此"msirunmode"以用户身份运行操作,或者我如何以其他方式解决此问题?

how can i change this "msirunmode" t run actions as the user, or how can i solve this problem other way?

推荐答案

您好RDStech,

Hi RDStech,

感谢您在此发帖。

由于此主题与应用程序设置有关,因此我将其移至ClickOnce和Setup&部署项目论坛以获得适当的支持。

Since this thread is related to application setup, I will move it to ClickOnce and Setup & Deployment Projects forum for suitable support.

https://social.msdn.microsoft.com/Forums/windows/en-US / home?forum = winformssetup

Visual C#论坛讨论并询问有关C#编程语言,IDE,库,示例和工具的问题。

The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

祝你好运,

杰克


这篇关于VS Setup Project以另一个用户身份运行自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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