Results 1 to 7 of 7

Thread: Unable to "Make" ActveX controls

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2019
    Posts
    15

    Unable to "Make" ActveX controls

    I'm migrating old VB 6.0 apps to Windows 11 which contain a few ActiveX controls that need to be registered. I did a "make" first to be sure they're healthy but get "Permission denied". This is a personal, non-corporate computer over which I should have administrative control, but I've gotten rusty and am unaware what to do to clear permission. Anyone have suggestions?

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2019
    Posts
    15

    Re: Unable to "Make" ActveX controls

    Thank you for replying but I am only at this point trying to File > Make to recreate the finished .OCX, and that is halted with "Permission denied". Isn't there some permission setting I need to change?

  4. #4
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: Unable to "Make" ActveX controls

    You need to run the VB6.EXE as an administrator, and then say "Yes" when you run it and it asks if you want to allow it to make changes to your system.

    When you compile an ActiveX (DLL or OCX), it attempts to register it after it's compiled. However, without the VB6.EXE being run as an administrator, it won't have permission to make changes to this part of the registry.

    And it doesn't matter if your user is an administrator. You still have to specifically run the VB6.EXE as an administrator.



    Name:  Admin.jpg
Views: 155
Size:  42.7 KB
    Last edited by Elroy; May 9th, 2024 at 05:41 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2019
    Posts
    15

    Re: Unable to "Make" ActveX controls

    Elroy, Thanks greatly for taking the time with so thorough a reply !!

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: Unable to "Make" ActveX controls

    And just to follow up a bit more, personally I do not run my VB6.EXE as an administrator. Most standard EXE VB6 projects work (and compile) just fine in the VB6 IDE without the VB6.EXE being run as an administrator. In a few cases it's still necessary, but, in those cases, I create a shortcut to the VB6.EXE (with my specific VBP file specified on the command line) ... and then I can set that shortcut to run as an administrator (in that specific case).

    Done that way, I have piecemeal control of when I'm running the VB6 IDE as an administrator, and, in most cases, I'm not.

    As a tip, in those shortcuts (LNK files), you have to point directly at the VB6.EXE (with a VBP specified on the command line of the shortcut). You can't just have a shortcut to the VBP, or the "run as administrator" checkbox will be grayed off.

    ------------------

    And done this way, I get the added benefit of being able to compile my ActiveX (OCX & DLL) projects without them getting registered (and cluttering up my registry). I still get that permission denied error, but the actual OCX (or DLL) still compiles just fine. It's just not registered, which I never want it to be anyway. Regarding DLLs, I've got code that loads them and uses them without registration. Regarding OCX files, I always create manifest information for them, and run them in a SxS mode. Done that way, no registration is require of either of them. And that allows me to keep even very complex projects "portable" (i.e., no installation needed).
    Last edited by Elroy; May 10th, 2024 at 07:06 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2019
    Posts
    15

    Re: Unable to "Make" ActveX controls

    Elroy, thanks for the extra consulting. Hope others will dig deep enough in this thread to discover it. Perhaps just post it in new "how to" thread.

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
  •  



Click Here to Expand Forum to Full Width