Visual Studio 2010 安装项目未为所有用户完全安装应用程序

发布于 2024-12-28 23:57:49 字数 601 浏览 3 评论 0原文

我有一个应用程序、Visual Studio 2010 安装项目和 Windows XP。在安装过程中,我的安装项目正在 HKLM 注册表中创建一些注册表项。在启动过程中,我的应用程序正在 HKCU 注册表中创建一些条目。安装程序操作已添加到安装、提交、卸载和回滚文件夹中。

现在进入正题。我有两个用户:管理员和受限用户(假设是约翰尼)。 从管理员帐户中,我运行安装程序,选择“对于所有用户”选项,安装成功完成。双击我的应用程序的桌面快捷方式,它可以正常启动。 然后,我打开 regedit 并以完全读/写/修改模式授予 Johnny 对 HKLM 注册表的访问权限。安装文件夹也是如此。之后,我只需删除安装程序 msi 文件即可。

我登录 Johnny 帐户并双击桌面快捷方式并运行安装程序!当然,它以错误结束,因为它找不到我之前删除的安装程序文件。对我来说奇怪的是,如果我双击程序文件中应用程序的 exe 文件,我的应用程序会正常启动(没有安装程序)。 我还注意到,安装过程后会留下 InstallState 文件,但删除它没有效果。

我想要实现的是出现一种情况,从管理员帐户成功安装后,Johnny 可以运行该应用程序,而无需系统在首次运行之前执行任何安装程序操作。

你能指出我正确的方向吗? 提前致谢, 皮奥特里克

I have an application and Visual Studio 2010 Setup Project and Windows XP. During installation, my setup project is making some registry entries in HKLM registry. During startup, my application is making some entries in HKCU registry. Installer action is added to Install, Commit, Uninstall and Rollback folders.

Now to the point. I have two users: admin and restricted user (let's say Johnny).
From admin account, I run installer, I choose "For all users" option and installation is completed successfully. Double click on desktop shortcut to my app and it starts normally.
Then, I open regedit and grant access in full read/write/modify mode to HKLM registry to Johnny. The same thing with installation folder. After all that, I simply delete the installer msi file.

I log into the Johnny account and double click desktop shortcut and installer runs! And it ends with error ofcourse, because it cannot find installer file which I previously deleted. Strange thing to me is, that if I double click on an application's exe file in Program Files, my app starts normally (without that installer thing).
I've also noticed, that InstallState file is being left after installation process, but deleting it has no effect.

What I'm trying to achieve is to have a situation, that after successful installation from admin account Johnny may run the app without any installer actions made by system before first run.

Can You please point me into the right direction?
Thanks in advance,
Piotrek

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文