Results 1 to 18 of 18

Thread: How to register a ocx control if i dont have an Administration Previllege.

  1. #1

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    How to register a ocx control if i dont have an Administration Previllege.

    Hi,

    I developed a Applicaiton in VB6, Access is the database. I used the FarPoint Control version 7. I compiled the project and created the exe through Package and Deployment Wizard. I installed in a client machine. During the installation i recieve the error

    Failure writing to the system regirstry. The registry may be corrupt or you may not have the required permissions to write to the registry.

    then if i contrinue after click the OK button for the above error the following error occurs next

    Setup has encounered an error in the Registration Database.
    and when i click OK , the following error occurs next

    Quote:ODBC's SQLInstallDriverManager failed.

    and when i click Ok then the following error occurs with the headin Setup Error 168

    Setup has encountered a problem updating your system registry.

    then the next error is

    An error occured trying to update the Windows registration database.

    when i click OK button , finally this error repeats for a very long time.

    In this company all PC's has restrictions and only certain pervilleges. I think the administrator previlleges is need to register this control. Kindly suggest me is there any alternate way for this - to register controls. itried through regedit, but not suceeded.

    I tried in another way, i used the Inno Setup Compiler and tried, still that too have problems but after the installation. But the problem occurs for the same control. fpspr70.ocx.
    When i use InnoSetup and install and when i try to use the Form which has the FarPoint Control. the below is the error comes

    Quote:Run-time error '339'
    Component 'FPSPR70.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.


    kindly tell me to solve this.

    Thankyou,
    Chock.
    Last edited by chockku; Oct 1st, 2005 at 06:34 AM.
    HAVE A NICE DAY

  2. #2
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: How to register a ocx control if i dont have an Administration Previllege.

    if the administartor Previllege is set on for not leting installation i am not shure if you can. some compenys even put a background app that will destroy the dll files that are bing instaled

    is 'FPSPR70.ocx' a custom control?


    here is the deal, limited acounts (asumming you got WIN XP) don't have the Previllege to write anything to the regesty, for limited its read only or not accessible at all
    Last edited by wiz126; Oct 1st, 2005 at 06:36 AM.
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  3. #3

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Hi,

    What's the solution for this. I need the administartion previlleges only for installing the first or will this require whenever i use the application or what. Is there any other alternate way to solve this. its going to be a multiuser system.

    Thankyou,
    Chock.
    HAVE A NICE DAY

  4. #4
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Failure writing to the system regirstry. The registry may be corrupt or you may not have the required permissions to write to the registry.
    is it a limited account?

    If yes,
    here is the deal, limited acounts (asumming you got WIN XP) don't have the Previllege to write anything to the regesty, for limited its read only or not accessible at all
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  5. #5

    Thread Starter
    Addicted Member chockku's Avatar
    Join Date
    Sep 2003
    Posts
    174

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Hi,

    The system has WinXP . i think its a limited account, bcoz if i want to install any software then it will ask for the admin previllege, then i have to call for the admin and he will install with the ADministrator password.

    this is what happening here.

    the application i prepared is going to be a multiuser system, should i need administrator previlleges to install in all my client pc or what. Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
    HAVE A NICE DAY

  6. #6
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by chockku
    the application i prepared is going to be a multiuser system, should i need administrator previlleges to install in all my client pc or what. Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
    I think so yes, if you have administrator previlleges you will have the previllege to install delete system file,dll, ... and also the right to write to regestry and delete from it
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  7. #7
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by chockku
    Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
    1) I don't understand what it is that you are asking.

    2) If you do not have the access rights to write into the registry you cannot install the application.

    3) The only resolution to this problem is to log into the machine with an account that has rights to do this. "Power User" can do it as well as "Administrators".

    4) Once the app has been installed, a normal user should be able to run it just fine.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  8. #8
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Dave Sell, if you would read what i wrote him you would understand that that problem was allready explained
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  9. #9
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by wiz126
    Dave Sell, if you would read what i wrote him you would understand that that problem was allready explained
    Not really:

    Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
    This question makes no sense. Maybe its just your English. In this question you state:

    "I have Admin Privelege"

    This means you must have the ability to install, as all admins can install.

    Then you ask:

    "is it possible to install the application and regirter the ocx or not"

    Answer: yes. All admins can install an OCX.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  10. #10
    Member
    Join Date
    Dec 2007
    Posts
    36

    Exclamation Re: How to register a ocx control if i dont have an Administration Previllege.

    Better question, and I think this is what he was on about...

    I make applications with a lot of DLL and OCX dependancies, and normaly I just place them in the application path ({folder_of_exe}\Data) and it loads all of them, there's one it won't load:

    THE DREADED VBMP.OCX

    I tried even putting it next to the EXE, but it won't load it unless it is registered. I have the source of the application (duh), what can I do to restrict the "look for" path to local?

    I found this on google:
    Code:
    
    SET DEFAULT TO (JUSTPATH(SYS(16)))
     && or 
    SET PATH TO (JUSTPATH(SYS(16))) ADDITIVE
    
    Would that work?
    What does it do?

  11. #11
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by d22552000 View Post
    I tried even putting it next to the EXE, but it won't load it unless it is registered.
    As per the above statement, if you compile an EXE that has a dependency on an OCX or COM-based DLL, then when you distribute the EXE to another machine, it is not enough to simply copy the OCX or DLL along with it. The OCX or DLL must first be registered on the OS before the EXE can be properly executed.

    During run-time, when the EXE makes a call into a COM-based library, the OS must first search the registry for the CLSID and PROGID in order to find the location of the library on disk.

    Not registering some components, because they simply reside next to the EXE in the same folder is not guaranteed to work reliably.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  12. #12
    Member
    Join Date
    Dec 2007
    Posts
    36

    Re: How to register a ocx control if i dont have an Administration Previllege.

    -- --
    Last edited by d22552000; Jan 20th, 2010 at 10:03 AM. Reason: code highlighting screwed up

  13. #13
    Member
    Join Date
    Dec 2007
    Posts
    36

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by Dave Sell View Post
    As per the above statement, if you compile an EXE that has a dependency on an OCX or COM-based DLL, then when you distribute the EXE to another machine, it is not enough to simply copy the OCX or DLL along with it. The OCX or DLL must first be registered on the OS before the EXE can be properly executed.

    During run-time, when the EXE makes a call into a COM-based library, the OS must first search the registry for the CLSID and PROGID in order to find the location of the library on disk.

    Not registering some components, because they simply reside next to the EXE in the same folder is not guaranteed to work reliably.
    I have been told twice now that VB has a keyword/command/api function call I can add to tell it where to search for APIs, COMs, and ActiveX OCX files. (( Oh, and I override the looking for COM-DLL files by manually loading them into the PROGRAM's memory, before calling ANY OTHER CODE. (( Hence placing them in {path_to_exe}\Data ))

    Now as per the OCX, it doesn't create a nice "memory string", and the program isn't looking in the memory for it . I don't even know where in my code I used VBMP, or I'd just work around that control. What does it do again?

    I know in VB.NET where I want to load something without registering it I do the same thing, load it into memory, then instead of calling a namespace or api call, I use the "location of memory at" type syntaxs to make it load the memory string instead of looking in the registry, where most computers do not have WRITE on the registry, let alone some that completely deny READ.

    Visual Basic Code:
    1. ' Custom function, searches for and loads file to memory using a custom searchpath with priority systems and access calculations, + "large memory" support
    2. ' String path :Path to file to load, file or localized to ".\Data"
    3. ' String con :Variable to make CONST and store addr to.
    4. ' @returns boolean :False on fail, + Exception, NULL on success
    5. ' THROWABLE: DllNotFoundException ( Main )
    6. ' THROWABLE: ArgumentNullException
    7. ' THROWABLE: AccessViolationException
    8. ' THROWABLE: UnauthorizedAccessException
    9. ' THROWABLE: ArgumentException ( Fallback )
    10. ' THROWABLE: Exception ( in case of utter failure )
    11. try {
    12.      wa_mem_load("ieutils.dll", "ieua")
    13. } Catch ex As DllNotFoundException {
    14.      DebugAll.log("Unable to load required file!:", ex.ToString, "", "Errors")
    15.      me.close()
    16. }
    17. ieu = AddressOf ieua
    18.  
    19. ' ieu is not instanced as the object itself
    20. ' and can be duplicated with new
    21. ...

  14. #14
    Addicted Member Optional's Avatar
    Join Date
    Jan 2010
    Location
    Rudimentary Space
    Posts
    214

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by chockku View Post
    In this company all PC's has restrictions and only certain pervilleges. I think the administrator previlleges is need to register this control. Kindly suggest me is there any alternate way for this - to register controls. itried through regedit, but not suceeded.
    If the application you installing needs it you need to register it.

    You don't realy need to be an admin but your user name must have rights to write to the registry which is an option a network admin can give a user without making him admin.

    I faintly remember our network admin showing me in AD that rules can be created to allow users to register ActiveX Controls with specific names, etc... check this with your Network Admins too.

    Trying to find a way around the security is not only an attempt in trying to hack your security rights given to you by the company but will also most likely breach your company user policy contract. In some companies, attempting to overwrite security policies without consent can get you fired.

    Check those policies with your Network Admins and be careful.

    Quote Originally Posted by chockku View Post
    Hi,
    the application i prepared is going to be a multiuser system, should i need administrator previlleges to install in all my client pc or what. Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
    For rolling out the Application on all Client PCs, you might find that by giving the OCX to the Network Administrators they can place it on a network share and run a log-in script on the required PCs which will register the OCX control.

    Another option would also be to give the application to install to the network admins and they can run it as silent-install through login-scripts (or similar) on the PCs required.

    Network Admins can do silent-installs of applications over the network.

    You will have to work closely on this with your network Admins to sort this out.
    Last edited by Optional; Jan 20th, 2010 at 11:13 AM. Reason: Removed some unrelated rubbish after realising OCX is not a custom OCX!



    Kind Regards,
    Optional



    If you feel this post has helped in answering your question please return the favour and Rate this post.
    If your problem has been solved and your question has been answered mark the thread as [RESOLVED] by selecting the Thread Tools menu option at the top and clicking the Mark Thread Resolved menu item.


    VB6 - (DataGrid) Get the Row selected with the right mouse button



  15. #15
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to register a ocx control if i dont have an Administration Previllege.

    it is possible to register dll /ocx, on a per user basis, without admin rights

    see http://www.vbforums.com/showthread.php?t=507228
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  16. #16
    Addicted Member Optional's Avatar
    Join Date
    Jan 2010
    Location
    Rudimentary Space
    Posts
    214

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Quote Originally Posted by westconn1 View Post
    it is possible to register dll /ocx, on a per user basis, without admin rights

    see http://www.vbforums.com/showthread.php?t=507228
    VB Code:
    1. Shell "regedit /s """ + strRegFile, vbHide

    Out of curiosity...
    In a tight company you have security policies applied to not allow you to write to the registry.

    If you log in and type regedit and you get an error saying you are not allowed (or similar) but then run the VB6 app and VB6 gets around that security policies, does that make VB6 a security risk ?
    Last edited by Optional; Jan 20th, 2010 at 03:35 PM. Reason: Rephrasing



    Kind Regards,
    Optional



    If you feel this post has helped in answering your question please return the favour and Rate this post.
    If your problem has been solved and your question has been answered mark the thread as [RESOLVED] by selecting the Thread Tools menu option at the top and clicking the Mark Thread Resolved menu item.


    VB6 - (DataGrid) Get the Row selected with the right mouse button



  17. #17
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to register a ocx control if i dont have an Administration Previllege.

    not really, many programs write to the registry to save settings and other information, security settings can be tightened, but many programs can not run successfully without some reg read, and write to current user hive

    blocking regedit, may stop users from breaking windows by uninformed editing of registry
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  18. #18
    Banned
    Join Date
    Mar 2012
    Posts
    1

    Re: How to register a ocx control if i dont have an Administration Previllege.

    Sorry that I up the old topic, but this is quite useful information for Visual Basic developers..

    I've been in stuck of registering of ActiveX libraries for my VB6 project too. The only solution I found for registering - ask user to run install with administrator privileges and during installation setup registers ActiveX.

    My project is for home users (which are usually are not smart enough) and it was a problem asking them to grant program administrator privileges. Another problem was ability, or really inability, to create portable version that can be run from USB stick from any PC. These reasons really cut me customers and required much time for support.

    Starting from begining, why ActiveX can't be registered without admin privileges? Just because registry HKEY_CLASSES_ROOT it write protected for usual Windows user, and program can't write to it.
    So the solution for the problem - use registry virtualization.

    I have found solution at http://enigmaprotector.com/ it is a freeware program Enigma Virtual Box. It is easy to use, we simply add ActiveX file to Files tree and in the properties for this file enable option Register as ActiveX. Also, Registry virtualization should be enabled.

    What advantages I got:
    1. No need to register ActiveX control at all, because Enigma Virtual Box does it itself
    2. Ability to merge all files of my application into single executable that makes my customer happy to run singe exe from USB as portable version.

    I believe you find this post useful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width