COM DLL exception in application when it auto launches after setup finishes installation!

故事扮演 提交于 2020-01-07 05:08:08

问题


I'm using this solution to modify the MSI to include a checkbox for user to decide whether s/he wants to launch the application after setup exits.

Although everything works just fine, what I noticed was the application was not able to use any COM DLL's registered during the setup when it was auto launched. The app works perfectly when launched again from start menu.

I have tested it on Windows XP and Windows 7.

The COM DLL's have been marked as self registering dll's in the setup project.


回答1:


I got it work. The problem was that the target directory was not specified. The bug fix was mentioned in this question.

I changed one of the lines in script to:

sql = "INSERT INTO `CustomAction` (`Action`, `Type`, `Source`, `Target`) VALUES ('VSDCA_Launch', '226', 'TARGETDIR', '[TARGETDIR]\\" + filename + " " + arguments + "')"; 



回答2:


It's hard to give an answer to such a specific question since I don't have your installer and application in a test lab to do some basic profiling and troubleshooting. However I will throw an idea at the wall and see if it sticks:

Is your working directory different between the shortcut and creating the process from the installer? Depending on how your COM was registered, this can make a difference.



来源:https://stackoverflow.com/questions/4422828/com-dll-exception-in-application-when-it-auto-launches-after-setup-finishes-inst

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!