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

查看:28
本文介绍了安装完成后启动应用程序,打开 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 或 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天全站免登陆