掛斷了一段期間COM去登記,並說The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation
。但實際上,我的擴展程序已成功卸載並卸載。環境
定義:
我創建某種虛擬外殼命名空間擴展測試。它實現IContextMenu
和所有方法返回S_OK
和別的什麼也不做和RGS文件是
HKCR
{
xxx.sergz.dummyShellExt.1 = s 'DummyNSE Class'
{
CLSID = s '{6C0FBE00-9898-4BB0-806F-3ED7D2F1170D}'
}
xxx.sergz.dummyShellExt = s 'DummyNSE Class'
{
CurVer = s 'xxx.sergz.dummyShellExt.1'
}
NoRemove CLSID
{
ForceRemove {6C0FBE00-9898-4BB0-806F-3ED7D2F1170D} = s 'DummyNSE Class'
{
ProgID = s 'xxx.sergz.dummyShellExt.1'
VersionIndependentProgID = s 'xxx.sergz.dummyShellExt'
ForceRemove Programmable
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
TypeLib = s '{3DC947F0-6691-4043-B414-29F749209905}'
Version = s '1.0'
}
}
NoRemove Directory
{
NoRemove Background
{
NoRemove ShellEx
{
NoRemove ContextMenuHandlers
{
ForceRemove DummyShellExt = s '{6C0FBE00-9898-4BB0-806F-3ED7D2F1170D}'
}
}
}
}
}
HKLM
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove Windows
{
NoRemove CurrentVersion
{
NoRemove Shell Extensions
{
NoRemove Approved
{
val '{6C0FBE00-9898-4BB0-806F-3ED7D2F1170D}' = s 'xxx.sergz Dummy shell extension.'
}
}
}
}
}
}
}
我選擇Professional
安裝程序,只增加了我的dll文件。在文件屬性Registration
選項卡上,我選擇Auto register file...
,Extract registration info...
和Synchronization
爲Enabled
。在Product Information->Install Parameters->PackageType
我選擇64-bit package for x64...
。
現在我構建MSI並安裝擴展。 啓動資源管理器,然後在文件夾背景上的某處執行右鍵單擊。根據我的日誌,我的擴展程序被加載並且是DLL_PROCESS_ATTACH和幾次DLL_THREAD_ATTACH。
我再次啓動MSI並選擇Remove
。它說你必須關閉... applications are using files...
,並且列表中只有Windows Explorer
。我選擇Automatically close ...
並按OK。
所有資源管理器窗口已關閉,但似乎資源管理器未關閉。
狀態是「關閉應用程序」,根據我的日誌dll已經卸載。問題在這裏。該DLL已經卸載,但MSI仍在等待,然後它說The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation
。 我點擊確定,這個過程繼續進行,最終我的DLL被成功刪除。
我使用Windows 8 64位。
這種等待的原因是什麼以及應用程序無法關閉的消息。我怎麼弄出來的?
「專業安裝程序」 - > http://advancedinstaller.com/user-guide/tutorial-professional.html。我可以使用WiX,但問題是關於高級安裝程序。實際上也有相同的情況,根據重現問題的步驟,高級安裝程序從DLL中提取rgs,我不使用自注冊/註銷。該DLL也可以立即被刪除,無需重新登錄。這是一個安裝工具的問題,它要求用戶使用打開的文件自動關閉應用程序或重新啓動計算機。 – SergZ 2013-04-06 06:56:48