在创建安装和部署项目并安装它之后尝试卸载组件时出现奇怪错误 [英] Strange error when trying to uninstall a component after creating setup and deployment project and installing it

查看:43
本文介绍了在创建安装和部署项目并安装它之后尝试卸载组件时出现奇怪错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在DLL项目中有一个COM对象。我创建了一个安装项目并将其添加到解决方案中。我构建了安装项目并运行了install命令。它装好了。然后我运行了卸载程序。它运行得很好。我让程序选择默认的
安装文件夹,我在安装程序中定义了该文件夹,它基于我拥有的另一个产品的注册表项。


然后我改变了将文件夹安装到我的"r:\ program32"目录并安装在那里。我的"R"驱动器是一个逻辑驱动器。我修改了我的安装程序依赖的注册表值,因此它是r:\ program32。我运行安装和 一切安装
罚款。我的DLL进入该目录。它是自我安装的,并且检查注册表显示我需要CoCreate COM对象所需的所有条目。


我运行了卸载。我得到并且错误:


无法为文件"R:\Config.MSI \。"设置文件安全性。错误:3。确认您有足够的权限来修改此文件的安全权限。


我看到"Config.Msi" dir on r:\。我在它上面运行了属性,它的目录是只读的。我删除了目录(没问题)。我再次运行,安装程序创建目录并给出相同的错误。我再次运行属性并取消选中read-on属性。我再次运行属性
,它仍然是只读的。我转到命令提示符窗口并运行attrib -r config.msi。我运行属性,它仍然是只读的。


我退出了visual studio。我以管理员的身份重新启动(我没有启用UAC,但我现在非常绝望,而且我的家用Vista机器上有UAC,我甚至在通过逻辑驱动器分配安装某些驱动器时编辑文件时遇到问题
除非我将逻辑驱动器指定为管理员并以管理员身份运行VS.作为管理员重新启动后,我尝试运行卸载,同样的错误。我这次取消了逻辑驱动器的分配并再次分配了逻辑驱动器作为管理员。我卸载时仍然收到
错误。


这是什么错误以及如何修复设置和部署程序?


RD荷兰

解决方案

您好,



I认为这个问题主要与逻辑驱动有关。


以前出现过类似的问题:
http://social.technet.microsoft.com/Forums/en/itprovistaact/thread/abc8b72c-932e-4f30-943d-9e7d6d2f4d0c


在该主题中,主持人建议
a链接
,其中提到了这些内容:


"如果您创建了一个驱动器作为普通用户映射并尝试使用提升的权限访问它,提升权限进程将不会"看到"驱动器映射。它不能,因为驱动器映射是在完全独立的用户帐户下完成的。"


可能的解决方案是将逻辑驱动器映射为管理员:


https:/ /groups.google.com/forum/?hl=zh-CN&fromgroups=#!topic/microsoft.public.windows.vista.general/eJai2RNIC0M


希望这些可以提供帮助。


谢谢,


I have a COM object in a DLL project. I created a setup project and added it to the solution. I built the setup project and ran the install command. It installed fine. I then ran the uninstall program. It ran fine too. I let the program choose the default install folder, which I defined in the setup program and which is based on a registry entry for another product I have.

Then I changed the install folder to my "r:\program32" directory and installed there. my "R" drive is a logical drive. I modified the registry value my setup program depends on so that it is r:\program32. I run install and  everything installed fine. My DLL goes to that directory. It is self-installing and a check of the registry shows all the entries I need to CoCreate the COM object are present.

I ran uninstall. And I get and error:

Could not set file security for file "R:\Config.MSI\.' Error: 3. Verify that you have sufficient privileges to modify the security permissions for this file.

I see the "Config.Msi" dir on r:\. I ran properties on it and it dir is read-only. I delete the dir (no problem with that). I run again, the setup creates the dir and gives the same error. I run properties again and uncheck the read-on attribute. I run properties again and it still has read-only. I go to the command prompt window and run attrib -r config.msi. I run properties and it is still read-only.

I exited out of visual studio. I restart as administrator (I don't have UAC on but I'm desperate at this point and with my home Vista machine with UAC on I have problems even editing files on some drives when they are mounted via logical drive assignments unless I assign the logical drives as administrator AND run VS as administrator). After restarting as admin, I try to run uninstall, same error. I unassigned the logical drive and assigned the logical drive again this time as administrator. Still I get the error when I uninstall.

What is this error and how can the setup and deployment program be fixed?


R.D. Holland

解决方案

Hello,

I think this issue is mostly related to the logical drive.

There has been a very similar issue before: http://social.technet.microsoft.com/Forums/en/itprovistaact/thread/abc8b72c-932e-4f30-943d-9e7d6d2f4d0c

In that thread, the moderator suggested a link, whick mentioned these content:

"If you create a drive mapping as a regular user and try to access it with elevated privileges, the elevated-privilege process won't "see" the drive mapping. It can't, because the drive mapping has been done under a completely separate user account."

A possible solution is mapping the logical drive as administrator:

https://groups.google.com/forum/?hl=en&fromgroups=#!topic/microsoft.public.windows.vista.general/eJai2RNIC0M

Hope these can help.

Thanks,


这篇关于在创建安装和部署项目并安装它之后尝试卸载组件时出现奇怪错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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