APUP Won't Start, Reports Multiple Automation Errors

Requests for help go in here.
Post Reply
User avatar
eewiz
Posts: 18
Joined: Fri Aug 28, 2015 4:24 am

APUP Won't Start, Reports Multiple Automation Errors

Post by eewiz »

On starting APUP I get:
Automation error
Library not registered.
In mdlInitialization.Main At Line 108
Clicking OK produces the same error except:
In mdlInitialization.Main At Line 100
Clicking OK produces the same error except:
In mdlInitialization.initFolders At Line 102
Clicking OK produces the same error except:
In mdlInitialization.initFolders At Line 104
Clicking OK produces the same error except:
In mdlInitialization.initFolders At Line 108
Clicking OK produces the new error:
Object variable or With block variable not set
In mdlInitialization.initFolders At Line 108
Clicking OK produces another:
Object variable or With block variable not set
In mdlInitialization.initFolders At Line 108
Clicking OK now terminates the program.

With the information above, can someone please tell me what automation resource (DLL. OCX, etc...) that APUP is exercising in mdlInitialization.Main at lines 100 and 108, as well as mdlInitialization.initFolders at lines 102, 104 and 108.
I have viewed the information displayed in process monitor between error messages and find nothing that points to why the next error message pops up.
I have viewed the results of dependency walker as the program operates and also find no smoking gun.
Also, AutoPatcher and Sweeper produce similar automation error failure messages before they terminate.
Please help.
User avatar
TheAPGuy
Site Admin
Site Admin
Posts: 979
Joined: Sun Oct 27, 2013 12:38 am
Location: California
Contact:

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by TheAPGuy »

Yep looks like your missing a few OCX files. Lets see... Apup itself needs MSCOMCTL.OCX, COMDLG32.OCX, RICHTX32.OCX, COMCTL32.OCX, and I don't think it needs FM20.DLL anymore but, that depends on the version you have. Older ones need it new ones don't.

LINKY TO OCX FILES: http://www.autopatcher.net/apengine/OCX_Files.7z
Unpack this into your "apup/bin" directory. Attached is a batch file, unzip it into the same directory as well. Edit the batch file by removing the "REM" from the correct line that specifies where your system folder is. "C:\Windows\SysWOW64" is for X64 OS. Run the batch file with admin rights.

The only reason for the errors is possibly your not running apup or autopatcher with admin rights so that it can copy those files to your windows directory then register them before it calls on them.
Attachments
ReregisterDLLs.zip
(591 Bytes) Downloaded 430 times
User avatar
eewiz
Posts: 18
Joined: Fri Aug 28, 2015 4:24 am

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by eewiz »

I'm using the latest version of APUP, v1.4.0.43.
I ran APUP on a win7 x64 box to populate that AutoPatcher folder with all of the latest stuff, then I copied the entire AutoPatcher folder to the XP x64 box that does not work.
I noticed that there is a new folder called apup_bin with the only OCX of interest being Mscomctl.ocx.
I still have the old bin folder from when this used to work the last time I ran APUP in January 2015.
In reference to the four OCX's mentioned, I already have all four in my SysWOW64 folder.
OCX Your Downloaded Version My SysWOW64 Version
comctl32.ocx 6.0.98.16 6.0.81.6
comdlg32.ocx 6.1.98.16 6.1.98.16
mscomctl.ocx 6.1.98.16 6.1.98.39
richtx32.ocx 6.1.98.16 6.0.88.77
In summary, your comctl32 and richtx32 were newer than mine. My mscomctl was newer than yours.
I unregistered and then registered my existing OCX's without issue. This did not fix the problem.
I copied all four of your OCX's to my SysWOW64 folder and registered them without issue. This did not fix the problem, APUP still produces all of the above errors.

By the way, please check your batch file, it has an error in all four xcopy lines. You did not include the % signs surrounding the DLLPath variable.
For example: I changed "xcopy DLLPath\comctl32.ocx %SystemPath%" to xcopy "%DLLPath%\comctl32.ocx %SystemPath%" in all four xcopy lines to make the batch file work correctly.

Thanks for all of your help. I have no idea where to go from here.
User avatar
TheAPGuy
Site Admin
Site Admin
Posts: 979
Joined: Sun Oct 27, 2013 12:38 am
Location: California
Contact:

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by TheAPGuy »

I have heard of dependancy walker before... so I tried it. lol it says a lot of different programs and games have issues. Ya it doesn't show any OCX files either. hmm.. do you have a DLL file called "FM20.DLL" I am pretty sure the new one doesn't need that but, I might have been thinking of just AP code doesn't need that.

I really recommend using the new AP V6.1 branch. It is both APUP and AP combined into one.
User avatar
eewiz
Posts: 18
Joined: Fri Aug 28, 2015 4:24 am

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by eewiz »

O.K. Now I am totally confused. So back to the beginning.
Just a few days ago, I clicked "The AutoPatcher Download" at the top of the AP forum and zip file named "Apup_1_4_43.zip" was downloaded.
In the zip file is a folder "apup_bin" and three files, "apup.exe", "apup.log" and "Sweeper.exe".
I unzipped the contents into a new empty directory called AutoPatcher on a win7 x64 box to populate that AutoPatcher folder with all of the downloaded stuff.
I ran APUP in that folder on that Win7 x64 box and downloaded some 9GB worth of stuff -- pretty much everything except for Vista -- then I copied the entire AutoPatcher folder (9GB+) back to the XP x64 box that doesn't work.
During the download process, APUP downloaded a new copy of AP along with "modules", "tools" and "translations" folders as well as all of the ".rti", ".rtiz" and ".MD5" ect... files.
Doing APUP.exe_right-click_properties_version says the version of APUP.exe is 1.4.0.43.
This is why I previously reported that "I'm using the latest version of APUP, v1.4.0.43."
I don't understand your reference to the "AP V6.1 branch". Is there a beta version somehow available?
The version of AP that APUP downloaded is v5.7.0.56.

Until now, I have not tried to run AP on the bad machine.
When I did, I get an error dialog titled "Some Kind Of Error" that says:
Automation error
Library not registered. On File: c:\autopatcher\autopatcher.log

Clicking OK, produced another error dialog titled "Crash Handler" that says:
What AutoPatcher was trying to do
It appears that the error occured while AutoPatcher was trying to get commandline arguments.
Where: mdlInitialization.SubMain()
Error Code: 0x8002801D: Automation error
Library not registered.

The version of APUP that I originally ran on Win 7 box, and the malfunctioning Win XP box, as well as the test XP VM, does not depend on the old bin directory with the 5 OCX's in it -- I have removed that bin directory from all boxes.
The version of APUP that I am running is the one that depends on the apup_bin directory containing the one Mscomctl.ocx file.
On the good box, (the XP64 VM) that APUP.exe, (v1.4.0.43) ultimately dumps out of itself when it starts curl.exe.
On the good box, I have to rename curl.exe to obtain equivalent dependency walker logs between the good and bad machines.
On the bad box, (the real XP64 machine) APUP never makes it to starting curl.exe.
In this fashion, one can see the red dependency walker errors that mean nothing because they appear in both the good and bad machine's dependency walker logs.

I just realized that my good test box (the XP64 VM) does not yet have XP64 SP2 installed, and it is also running internet explorer v6 where the bad machine is running IE v8.
I will post again with some accurate results when i get both boxes running the same updates, apples for apples.

Thanks again for your interest in this matter.
User avatar
TheAPGuy
Site Admin
Site Admin
Posts: 979
Joined: Sun Oct 27, 2013 12:38 am
Location: California
Contact:

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by TheAPGuy »

I have pretty much stopped work on all versions of apup since there were no more reported errors. I then commenced work on combining the two apps together while weeding out dependencies that were not needed. The result was AP 6.1 branch. Pretty much in the release phase with a few minor bugs. Then came converting the entire code base to VB.NET from VB 6 (totally old). I am almost done converting the code. The reason for leaving APUP still available was there are a few command lines that still need some touch up in V6.1 branch that were just low on my list not to mention the odd bug that was discovered here and there.

Where you can find the topic for AP 6.1 LINKY: viewtopic.php?f=26&t=47
Where you can find the last post with the latest version LINK: viewtopic.php?f=26&t=47&start=220#p3706

Do me a favor... try running sweeper on the bad machine. Sweeper needs very little to run. MAKE SURE TO HIT NO if it asks to delete things. Don't want to delete things if your having issues atm. Copy paste the log it generates.
User avatar
eewiz
Posts: 18
Joined: Fri Aug 28, 2015 4:24 am

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by eewiz »

I had to put the bin folders back into ths AutoPatcher folders because AP failed after moving the bin folders.
I now realize that APUP uses the stuff in the upup_bin folder and AP uses the stuff in the bin folder.

I ran Sweeper as requested. The result was:
Automation error
Library not registered.
in prjSweeper.SubMain At Line 100
Clicking OK produces:
Run-time error '5'.
Invalid procedure call or argument
Clicking OK ends Sweeper.

I HAVE FOUND THE REASON WHY!!!

Dependency walker showed me this: (had to select the additional profiling option "Log first chance exceptions")
Everything was identical on both boxes until here.

On the good box:
LoadLibraryExW("C:\WINDOWS\SysWow64\scrrun.dll", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned 0x736F0000.
GetProcAddress(0x736F0000 [SCRRUN.DLL], "DllGetClassObject") called from "OLE32.DLL" at address 0x776ADC80 and returned 0x736F390D.
GetProcAddress(0x736F0000 [SCRRUN.DLL], "DllCanUnloadNow") called from "OLE32.DLL" at address 0x776ADC96 and returned 0x736F14ED.
GetProcAddress(0x75DA0000 [SXS.DLL], "SxsOleAut32RedirectTypeLibrary") called from "OLEAUT32.DLL" at address 0x7D0F27CA and returned 0x75DC6551.
LoadLibraryA("kernel32") called from "MSVBVM60.DLL" at address 0x7342A15B.

On the bad box:
LoadLibraryExW("C:\WINDOWS\SysWOW64\scrrun.dll", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned 0x736F0000.
GetProcAddress(0x736F0000 [SCRRUN.DLL], "DllGetClassObject") called from "OLE32.DLL" at address 0x776ADC80 and returned 0x736F390D.
GetProcAddress(0x736F0000 [SCRRUN.DLL], "DllCanUnloadNow") called from "OLE32.DLL" at address 0x776ADC96 and returned 0x736F14ED.
GetProcAddress(0x75DA0000 [SXS.DLL], "SxsOleAut32RedirectTypeLibrary") called from "OLEAUT32.DLL" at address 0x7D0F27CA and returned 0x75DC6551.
First chance exception 0xC000008F (Float Inexact Result) occurred in "KERNEL32.DLL" at address 0x7D4E21B6.

The good box did the "call from MSVBVM60.DLL" and the bad box did the "Float Inexact Result".

I then ran both APUP's in process monitor and located the point of the LoadLibraryExW("C:\WINDOWS\SysWOW64\scrrun.dll" on both the good and bad boxes.

On the good box:
RegOpenKey HKCR\Wow6432Node\TypeLib\{420B2830-E718-11CF-893D-00A0C9054228}\1.0\0\win32 SUCCESS

On the bad box:
RegOpenKey HKCR\Wow6432Node\TypeLib\{420B2830-E718-11CF-893D-00A0C9054228}\1.0\0\win32 NAME NOT FOUND

I did process monitor's right-click_Jump-to... to go to the two registry entries.

On the good box I found:
[HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{420B2830-E718-11CF-893D-00A0C9054228}\1.0\0\win32] @="C:\\WINDOWS\\SysWOW64\\scrrun.dll".

On the bad box I found:
[HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{420B2830-E718-11CF-893D-00A0C9054228}\1.0\0\win64] @="".

On the good box, the key ended in "win32" and the default entry pointed to "C:\WINDOWS\SysWOW64\scrrun.dll".
On the bad box, the key ended in "win64" and the default entry pointed to nothing. It was blank. there was no "win32" at all.
I am sure that no one knows how a key in the [HKEY_CLASSES_ROOT\Wow6432Node\TypeLib section that points only to 32 bit stuff could have the 32 bit key erased and the key name changed to "win64", but that is exactly what happened on my XP64 box. I think it's called windows entropy.

So I renamed the "win64" key to "win32" and added "C:\\WINDOWS\\SysWOW64\\scrrun.dll" to the default value and AP, APUP and Sweeper all now work correctly.
This troubleshooting would have been so much easier if visual basic would have reported that the missing library was scrrun.dll.

I hope this information may be useful to others in need of troubleshooting their sick windows box.
Again, as always, thank you for your interest into this matter.
I doubt that I would have ended with this successful result without your invaluable guidance. This type of troubleshooting is not easy to perform.
I am an electrical engineer with 35 years experience designing embedded systems hardware and firmware using Microchip, Freescale, Renesas and other microprocessors.
I have been writing assembler and C for microprocessor based embedded systems since 1980.
My hat is off to you, I have never written a windows program and probably never will.

Thank You
User avatar
TheAPGuy
Site Admin
Site Admin
Posts: 979
Joined: Sun Oct 27, 2013 12:38 am
Location: California
Contact:

Re: APUP Won't Start, Reports Multiple Automation Errors

Post by TheAPGuy »

Well... you probably didn't have to do all that. You probably could have done an unregister and re-register on scrrun.dll. I totally did NOT think you had an issue there, though since that is something window comes with! Well its how should I say... defunct now. Its recommended to stop relying on it. The .NET code does not use it at all. Took me a good chunk of time to come up with my own version of the code in there.

No good sir my hat is off to you. You did stuff your your days I probably couldn't dream up, all without a nice interface. Not only that but, you went so far as to dig around in the registry to solve this issue. Your dedication to getting this to work shows in the labor you put to get your issue solved.
Post Reply