安装完成后启动应用程序,并打开UAC [英] Launch application after installation complete, with UAC turned on

查看:106
本文介绍了安装完成后启动应用程序,并打开UAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天.

我一直在使用WIX(Windows Installer XML)技术为我们的产品构建安装程序.如果在安装后选中了该复选框,则预期的行为是该产品已启动.

I've been building an installer for our product using the WIX(Windows Installer XML) technology. The expected behavior is that the product is launched, if the check box is checked after installation.

这已经工作了一段时间,但是最近我们发现Win 7的UAC和Vista正在阻止启动该应用程序.我已经做了一些研究,并建议我应该添加属性

This has been working for some time now, but we found out recently that UAC of Win 7, and Vista is stopping the application from launching. I've done some research and it has been suggested to me that I should add the attributes

Execute ='deferred'和Impersonate ='no'.

Execute='deferred' and Impersonate='no'.

我这样做了,但是后来发现要延迟执行,必须在InstallInitialize和IntallFinalize两个阶段之间执行CustomAction.这不是我所需要的.如果选中启动复选框,则我需要该产品在安装完成后启动.还有其他提升权限的方法吗?

Which I did, but then found out that to execute deferred, the CustomAction has to be performed, between the InstallInitialize, and IntallFinalize phases; which is not what I need. I need the product to launch AFTER install finalize, IF the launch checkbox is checked. Is there any other way to elevate permissions?

任何人,所有答案,建议或共鸣都将不胜感激.

Any and all answers, suggestions, or resonings will be appreciated.

推荐答案

不幸的是,Rob提到的主题对Windows Vista或Windows 7确实没有帮助.特别是在打开UAC的情况下.

Unfortunately, the topic that Rob mentioned doesn't really help for Windows Vista or 7 as I have found. Especially with UAC turned on.

解决这个问题的方法是使用CustomAction,它会启动命令提示符并启动您想要的应用程序.

The way I have got around this is to use a CustomAction that launches the command prompt and launches the application you want.

<CustomAction 
    Id="LaunchApp" 
    Directory="YourDirectory" 
    ExeCommand="[SystemFolder]cmd.exe /C app.exe" />

希望有帮助.

这篇关于安装完成后启动应用程序,并打开UAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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