|
-
November 9th, 2009, 11:51 AM
#1
OCX registration in Windows Vista failed
My application is not running in Vista due MSChrt20.ocx; This control is not distributed in Vista.
I tried to register this control programmatically but the problem is I can not run regsvr32 utility from my program. [ShellExecute(NULL, "open", "Regsvr32.exe", "MSCHRT20.OCX /s", "C:\\windows\\system32\\", SW_HIDE);]
As an alternate approach, I thought of creating all the registry entries for this control manually but again I am not able to create the registry entries programmatically.
Did anyone face similar problem. I would really appreciate if someone tell me how to fix this as this one is release stopper!!!!!
I found a work around, manual solution: create a command shell; run it as admi; run regsvr32
But I dont want users to carry out the same exercise.
-
November 10th, 2009, 02:11 PM
#2
Re: OCX registration in Windows Vista failed
 Originally Posted by sroy150
I found a work around, manual solution: create a command shell; run it as admi; run regsvr32
But I dont want users to carry out the same exercise.
Why not create an installer for your program? That way the user runs your installer (setup.exe) and your program gets installed correctly (folders created, files copied, controls registered, etc.).
-
November 11th, 2009, 06:42 AM
#3
Re: OCX registration in Windows Vista failed
Well, we do not provide the installer for our application. It's just an exe that runs in a flash memory. That's why this OCX is a resource in the application. If the system does not have this OCX, the application will install it from it's resource. In XP, it works but in Vista, due to security issue, regsvr32 fails.
-
November 11th, 2009, 09:15 AM
#4
Re: OCX registration in Windows Vista failed
 Originally Posted by sroy150
Well, we do not provide the installer for our application. It's just an exe that runs in a flash memory. That's why this OCX is a resource in the application. If the system does not have this OCX, the application will install it from it's resource. In XP, it works but in Vista, due to security issue, regsvr32 fails.
It's not a security issue. Starting in Vista, by default, programs are not run with administrator privileges even if the current user is an admin. It's the same for Windows 7 as well. You might consider using a newer control that is available on the system or create an installer.
-
November 12th, 2009, 06:24 AM
#5
Re: OCX registration in Windows Vista failed
Thanks Ajay.
Actually finding the newer control is a good option but that will require me to recode the entire logic.
-
November 17th, 2009, 05:31 AM
#6
Re: OCX registration in Windows Vista failed
I use the WinExec API in vb with regsvr32 in the command line.
Although this may not help with security restrictions.
You might also try different verbs in the ShellExecute, ie null or runas.
Using runas, might give you the access needed to register it.
Oh, and try it without the silent /s parameter!
Last edited by TT(n); November 17th, 2009 at 05:33 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|