Results 1 to 11 of 11

Thread: why vb6 build very slow on win10 ?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2017
    Posts
    236

    why vb6 build very slow on win10 ?

    hi~ all

    compile the same vb6 vbp file ( code line = 120,000 )

    (1) win7 : 20 sec
    (2) win10 : 50 sec
    Last edited by quickbbbb; May 8th, 2022 at 08:41 PM.

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: why vb6 build very slow on win10 ?

    Just deactivate all "compatible to XP" or "compatible to Win7" shims... (on VB6.exe)...
    or (if you run the compiler from a batch-file) - point your batch to a copy (e.g. VB6_compile.exe),
    which you placed beside VB6.exe.

    Only the "run as Admin"-switch should be in place...

    Olaf

  3. #3
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by Schmidt View Post
    Just deactivate all "compatible to XP" or "compatible to Win7" shims... (on VB6.exe)...
    or (if you run the compiler from a batch-file) - point your batch to a copy (e.g. VB6_compile.exe),
    which you placed beside VB6.exe.

    Only the "run as Admin"-switch should be in place...

    Olaf
    What are the reasons for running vb6 as an admin?

    Recently I turned off the "run as Admin" switch because running vb6 in that way caused an activeX project to throw runtime error 429 "ActiveX component can't create object" and that was the solution I found online for that.
    Since then I haven't noticed any issues from running vb6 as a normal user in my other projects.
    I know that at the time of installing VB6 on Windows 10 that you need to have it run as an admin but now I'm wondering if it is just a one-time only requirement?

  4. #4
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    759

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by vbrad View Post
    What are the reasons for running vb6 as an admin?
    Basically, because it works when you do and frequently fouls up when you don't.

    Remember that VB6 was "born" back in the days of Windows 95, long before User Account Control (UAC) was "a thing" and logging onto your machine as an Administrator meant that you were an Administrator and could do any and all the Administrator-y things you wanted, without "interference".
    Simply put, that's no longer the case.

    Doing just about anything with ActiveX requires updates to [protected bits of] the Windows Registry (HKEY_CLASSES, etc.) and that requires Administrative access.

    Regards, Phill W.

  5. #5
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by Phill.W View Post
    Doing just about anything with ActiveX requires updates to [protected bits of] the Windows Registry (HKEY_CLASSES, etc.) and that requires Administrative access.
    Thanks Phil, that makes sense.
    The only thing is that I needed to turn off "run as admin" in order to not get an error with an activeX project in the IDE.

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: why vb6 build very slow on win10 ?

    You almost certainly trashed the registry somewhere along the line. Running VB6.EXE without elevation almost certainly is doing even more damage.

    Most likely you had improperly installed something. The "something" is probably only registered in the virtualstore for the user profile you are using.

    My guess is that you grabbed some DLL or OCX that didn't have a proper installer. Then you ran regsvr32 on it without elevation.

  7. #7
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by dilettante View Post
    You almost certainly trashed the registry somewhere along the line. Running VB6.EXE without elevation almost certainly is doing even more damage.
    Thanks dilettante. Is this true even if I am not seeing any errors reported? If un-elevated VB6.EXE cannot access the registry, what
    harm can it do there? Sorry if that's a stupid question


    Quote Originally Posted by dilettante View Post
    My guess is that you grabbed some DLL or OCX that didn't have a proper installer. Then you ran regsvr32 on it without elevation.
    I don't suppose there's an easy way of finding the culprit(s) !

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: why vb6 build very slow on win10 ?

    If a library was not registered in HKLM then an elevated process (e.g. VB6.EXE) can't find it.

    If the library is improperly registered in the user account's virtualstore (which is within the user's HKCU) then unelevated processes run by that user will see it. That's how the virtualization redirects work.

    The "damage" is that you can end up with a bunch of orphaned registry entries and programs that sort of seem to work except when they don't. At that point users often resort to bashing things with hammers and often make matters even worse. They often use Google to find wrong answers advising them to try pouring on gasoline and setting things afire. Pretty soon the mess is so bad that unraveling it becomes very difficult.


    As for "the culprit" though... don't you know what line of code is throwing that exception 429? Surely that should point you to the problem library, right?

  9. #9
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by dilettante View Post
    If a library was not registered in HKLM then an elevated process (e.g. VB6.EXE) can't find it.

    If the library is improperly registered in the user account's virtualstore (which is within the user's HKCU) then unelevated processes run by that user will see it. That's how the virtualization redirects work.

    The "damage" is that you can end up with a bunch of orphaned registry entries and programs that sort of seem to work except when they don't. At that point users often resort to bashing things with hammers and often make matters even worse. They often use Google to find wrong answers advising them to try pouring on gasoline and setting things afire. Pretty soon the mess is so bad that unraveling it becomes very difficult.
    Ah ok, thanks




    Quote Originally Posted by dilettante View Post
    As for "the culprit" though... don't you know what line of code is throwing that exception 429? Surely that should point you to the problem library, right?
    LOL, makes sense! (much egg on face)

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jun 2017
    Posts
    236

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by Schmidt View Post
    Just deactivate all "compatible to XP" or "compatible to Win7" shims... (on VB6.exe)...
    or (if you run the compiler from a batch-file) - point your batch to a copy (e.g. VB6_compile.exe),
    which you placed beside VB6.exe.

    Only the "run as Admin"-switch should be in place...

    Olaf
    my vb6.exe not activate "compatible to XP" or "compatible to Win7"

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: why vb6 build very slow on win10 ?

    Quote Originally Posted by quickbbbb View Post
    my vb6.exe not activate "compatible to XP" or "compatible to Win7"
    Did you try my second suggestion, doing your compile with a fresh FileCopy of VB6.exe?
    (e.g. named VB6_compile.exe).

    If that does not change anything with performance, then there remains only the issue of:
    "compiling against a Network-Drive" (when both, source-files and target-binaries are not located on a local disk).

    Olaf

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