Unhandled exception- Retrieving COM class factory - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Unhandled exception- Retrieving COM class factory

My installer app was running fine until one day a user asked me to setup my installer to auto run my VB.Net app on logon. From this day onwards, my users are getting the error:

Unhandled exception ...... Retrieving the COM class factory for component with CLSID {0006F03A-0000-C000-000000000046} failed due to the following error: 80080005.

If I ask the users to quit my VB app and then run it from Start\Programs, everything works fine, so it's got to be the way AI has setup my VB.Net app to run on logon. Here's how it's setup:

Task
Install condition: 1
Run: [#Tray_Notification.exe]

Account
Property Based User - [%Userdomain]\[LogonUser]
Run only if this user is logged on

Schedule
At Logon

Note that my users are not in a domain.

Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Unhandled exception- Retrieving COM class factory

Hi,

Since your users are not in a domain, the task shouldn't use a domain. Try using just "[LogonUser]" in the "User" field.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Re: Unhandled exception- Retrieving COM class factory

Hi, sorry for the delay in replying, but I've been away and working on this project again. It seems that I'm getting the error when:

* AI installs my application and sets it to run on Windows Start Up.
* My app runs in the tray and while it scans the Outlook Inbox, I cannot manually start Outlook.
* When my app has finished scanning the Inbox and is sitting dormant in the system tray waiting for the next scheduled scan, I can open Outlook OK.
* While Outlook is open, if my app triggers a scan of the Inbox, the error appears.

My app and Outlook are running under the user credentials of the user who logs on (according to Task Manager).

If I close my app and then run it from Start\Programs, everything works fine and there are no errors!

I'm monitoring what's going on via the Win7 Task Manager. Outlook 2007. Can you help to explain what is happening?
JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Re: Unhandled exception- Retrieving COM class factory

I've also found that when I log off and back on again, only sometimes, my app, which normally sits in the System tray, is not there! No icon! But it is running in Task Manager under the credetials of the logged on user!? Now things are getting stranger!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Unhandled exception- Retrieving COM class factory

Hi,

This seems to be a problem in your application. Since it runs under the correct user account, there's not much we can do. Try using a delay (5-10 seconds) before starting any operations to allow the system to fully load.
I've also found that when I log off and back on again, only sometimes, my app, which normally sits in the System tray, is not there! No icon! But it is running in Task Manager under the credetials of the logged on user!?
I'm not sure why this happens. The scheduled tasks feature simply creates a Windows scheduled task, like a user would create it manually. What happens after that is controlled by Windows.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Re: Unhandled exception- Retrieving COM class factory

Cosmin,

Thank you for your reply but I cannot see this being a timing issue. I can wait one hour, then open Outlook and when my app scans the inbox, bang.....the error appears. If I then manually run my app from Start\Programs, everything runs fine.

Thus, the only difference is that my app is started when Windows starts and the startup was setup by AI. I have a feeling that it has to do with how AI has told my app to startup when the user logs on. Let me know what you think.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Unhandled exception- Retrieving COM class factory

Hi,

Can you please try configuring a scheduled task manually and see if the behavior is the same? Make sure you use the same settings you configured in Advanced Installer.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Re: Unhandled exception- Retrieving COM class factory

Creating the startup task manually seems to have fixed the issue. Here are the exported tasks:

* Set TN to start on logon.xml => Created by AI
* Test TN.xml => Created manually
Attachments
Test TN.xml
(3.04 KiB) Downloaded 597 times
Set TN to start on logon.xml
(2.44 KiB) Downloaded 412 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Unhandled exception- Retrieving COM class factory

Hi,

I noticed that the manually created task is running with least privileges rights. Can you please try configuring it to run with highest privileges. Let me know if the error occurs.
If it doesn't, can you please try this:
- open your Advanced Installer project
- go to "Scheduled Tasks" page and edit your task
- make sure that the target file reference is enclosed in quotes:

Code: Select all

"[#Tray_Notification.exe]"
- rebuild your project and test it again

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”