[英]Install Shield 2009 Premier, Uninstall doesn't close the process/gui
我的應用程序(使用C#.net開發)現已打開,我已卸載,InstallShield給出了消息,指示該應用程序已打開以及是否真的要關閉該應用程序。 選擇“忽略”繼續卸載。 應用程序的某些文件和exe文件未關閉。 如何在卸載時通過installshield關閉它們。 或有一些我必須設置的屬性。 我知道在卸載時添加自定義操作可以殺死該進程,但是installshield不應該這樣做嗎?
如果您的項目類型是InstallScript MSI或它支持Installscript,則我更願意為此編寫代碼,例如:
export prototype _Server_UnInstalling();
function _Server_UnInstalling()
STRING Application, ServiceName;
begin
//application name
Application = "Demo";
MessageBox("In _Server_UnInstalling",INFORMATION);
//Check whether application is running or not.
if ProcessRunning( Application ) then
MessageBox("Demo is running",INFORMATION);
//Close server Application
ProcessEnd(Application);
endif;
//if application is having service at the background then
ServiceName = "Demo Server";
//Uninstall the server windows services on uninstallation.
ServiceRemoveDuringUninstallation(ServiceName);
end;
上面的示例給出了框架,您需要實現ProcessRunning,ProcessEnd和ServiceRemoveDuringUninstallation方法的邏輯,可以參考他們提供給文檔的Installshield幫助文檔以及源代碼。
希望這可以幫助...
如果您的目標是重新啟動打開的應用程序並且不遵循“忽略”選擇,則可以考慮將“ REBOOT”屬性設置為“ Force”。 這將要求該用戶重新啟動系統,從而達到您想要的結果。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.