-
March 10th, 2010, 01:29 AM
#1
How to register an ActiveX ocx file
Hello All,
I am registering an ActiveX as follows:
Code:
CString ocxFile = L" /s \"" + ocxFile + L"\""; // for silent install
HINSTANCE hInstance = ::ShellExecute(NULL, L"open", L"regsvr32.exe", ocxFile, NULL, SW_HIDE);
It works fine when user has admin rights . If user does not have admin rights then it can not register. Any solution of it ?
I am developing in XP and testing in xp and win7
Last edited by rahul.kulshreshtha; March 10th, 2010 at 01:34 AM.
-
March 10th, 2010, 03:09 AM
#2
Re: How to register an ActiveX ocx file
Make sure the user has admin rights. AFAIK you always need admin rights to register ocx files.
-
March 10th, 2010, 03:56 AM
#3
Re: How to register an ActiveX ocx file
Originally Posted by Skizmo
Make sure the user has admin rights. AFAIK you always need admin rights to register ocx files.
Thanks Skizmo,
I know that it requires admin-rights.
For that I changed configuration of my MFC project to use UAC that worked but it will run the application in admin mode. So applicaiton will use admin's application data folder and I don't want this. Because my application is user specific so I want if any user is running the application then application should use current user's application data folder.
Do you have any experience using UAC just for few statements of code instead of whole application level.
Thanks,
Rahul
Tags for this Thread
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
|