Results 1 to 8 of 8

Thread: [RESOLVED] How To Register OCX file on Vista?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2007
    Location
    Brunei Darussalam
    Posts
    50

    Resolved [RESOLVED] How To Register OCX file on Vista?

    with my xp desktop computer there is no problem if i want to register it,

    for example i want to use the xpbutton.ocx,
    what i do is copy the file to system32 and register it with regsvr32 + ocx file

    in vista how to do that,
    because if i do with the same process i just encounter an error


  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: How To Register OCX file on Vista?

    You have to have admin rights to register it. If you are doing it from command prompt you need to open it as admin first.

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2007
    Location
    Brunei Darussalam
    Posts
    50

    Re: How To Register OCX file on Vista?

    i think i am on admin account, coz there is no other account on my laptop sir,
    and if i am wrong how to do open it with command prompt using admin permission?
    can you tell me step by step sir?


    thanks

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: How To Register OCX file on Vista?

    In Vista and W7, all accounts (even admin types) run as a standard user, but when some action that requires admin rights is needed, the process gets elevated to acomplish the task. This is a security feature in those versions of Windows.

    Top open command prompt as admin, open Start Menu, in the search field type: cmd, then in the top left corner of the menu, when the search result appears right-click on cmd and choose Run as administrator. You should get an UAC prompt to confirm the elevation.

  5. #5

    Thread Starter
    Member
    Join Date
    Dec 2007
    Location
    Brunei Darussalam
    Posts
    50

    Re: How To Register OCX file on Vista?

    thanks sir,
    its done!


  6. #6
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: How To Register OCX file on Vista?

    No problem!

    If your question is answered, please take time to mark the thread Resolved. You can do so by going to the Thread Tools menu which is on the right side, above your original post, and choosing Mark Thread Resolved.

    Also, you should keep that principal in mind when programming. For example, if your application does anything that requires admin privileges (like writing to the partition root, Windows, System32 and other system folders, writing to any other hive in registry other than HKEY_CURRENT_USER), the operation will fail unless your application has been started as admin (like you started cmd).

  7. #7
    Member
    Join Date
    Dec 2009
    Location
    Canada. Toronto
    Posts
    51

    Re: [RESOLVED] How To Register OCX file on Vista?

    hello here is another way
    http://www.vbforums.com/showthread.php?t=612534
    just save that to bat file and right click on it and then press run as admin

  8. #8
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: [RESOLVED] How To Register OCX file on Vista?

    That's basically the same thing except you are indirectly opening the command prompt.

    Regardless, deployment and registration of the components should be the job of the installer, which will run at admin level anyway so it won't present a problem.

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