none
Potential problem involving mschrt20.ocx and Windows 7

    Question

  • I'm running Visual Studio 2005 and I've been developing a Winforms app (ClickOnce deployment).  Up till now both development and use have been in a Window XP environment.  This program uses the control mschrt20.ocx in one minor screen.  Quite frankly my use of it has been mostly trial and error and it's going to be replaced.  

    Due to earlier problems with XP machines, I have a check at startup that makes the call "regsrvr32 /s mschrt20.ocx" if it cannot instantiate the control. At this time it seems to be running without any error.  However the program's first installation on a Win7 machine has resulted in the error "Error registering chart ocx, error = Class not registered (Exception from HRESULT:0x80040154(REGDB_E_CLASSNOTREG))" when the user tries to run the form that actually uses the ocx.

    (I should mention that I am at a bit of a disadvantage here because the machine in question is far away and I don't yet have access to a Windows7 machine personally.)

    Anyone else have this problem?

    Monday, August 02, 2010 7:21 PM

Answers

  • Yes, registration is usually done in the app's installer which would be running as admin. It is a high risk to run apps that requires admin, so Microsoft is giving the user more control over the process.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, August 03, 2010 4:19 PM

All replies

  • Is regsvr32 running in an elevated process? (that is, the system asks for administrator password or confirmation of running as administrator before your process starts)

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Monday, August 02, 2010 9:00 PM
  • I'm not absolutely sure what you're referring to since I haven't even seen Windows 7 in action yet but if it's anything like Vista, the answer is probably yes.

    Apparently the program itself didn't have enough authority to make the regsrvr32 call.  I've been told that the user was able to register the control while in admin mode and that now my application runs normally.

    (And hopefully I'll be buying a Windows 7 machine this weekend so I can finally get some hands-on experience.)

    Tuesday, August 03, 2010 1:09 PM
  • Yes, registration is usually done in the app's installer which would be running as admin. It is a high risk to run apps that requires admin, so Microsoft is giving the user more control over the process.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, August 03, 2010 4:19 PM