Fresh OS fails to register dll error 1904
Updated: 19 Oct 2011 | 12 comments
This issue has been solved. See solution.
Hi,
on the fresh installation of Os (ex. windows 2003 server) when the installation runs, fails to register dll files. I get popup saying fail to register dll file with abort, retry.... option. next, i go to add/remove program, remove the package (created i wise), run it for the second time it runs ok. so everytime when a pc has a clean installation of OS (windows 2003 or windows 7) when installation runs for the first time this issue happens,Second time installer is able to register all the dll files. it looks like the package not able to access registry when first time runs.
Discussion Filed Under:
Comments
registery
in log file i get this after APPSearch Action:
MSI (c) (38:48) [15:46:48:437]: Note: 1: 2262 2: CompLocator 3: -2147287038
MSI (c) (38:48) [15:46:48:437]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\SOFTWARE\MyApp Inc. 3: 2
MSI (c) (38:48) [15:46:48:437]: Note: 1: 2262 2: IniLocator 3: -2147287038
which is not there when i run the installer for the second time.
Only happens on the first time....
I have seen other post where people having problem with registering dll files. some remove from selfreg table...etc. but this issue will happens only when a Clean install of OS done. i can register them manually with no problem. but installer fails on the first attempt. when it is ran right after failling the first time, everything works ok....!!!!
Does your app install any
Does your app install any runtimes first? If so this could be a timing issue.
I would be tempted to run a capture tool before the first attempt to install your app, then run it again after the first attempt fails. You don't mention whether the first attempt rolls back when it fails - if it does, then the two snapshots should record any changes that are left behind after the failed attempt. If the first attempt does not roll back then that may indicate other issues.
There is so little information to go on in your posting that it's difficult to be more specific. Is this a vendor or home grown MSI? Does it have an appsearch action - if so, what is it looking for?
Does the problem occur on silent and interactive installs, or just interactive?
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Thanks for the reply. this
Thanks for the reply. this package is done by someone internally. the installation does not roll back. it fails with no roll back. comapring the two log files between the first attempt and second i see only the error 1904. the installation is interactive. i do not get much from the log file to post here. the strang thing is that why the first attempt only....
I believe you should contact
I believe you should contact the person who has created this install and discuss this problem with them. You have only published a couple of lines from the log, but my guess would be that the install is using the selfreg table and that the order of installation of the DLL files may be causing the error because a dependent DLL is not installed when one of the DLL files tries to register. It is not unusual to have DLL registration dependent on the presence of another DLL or several DLLs. If the DLLs are then present when you retry the installation, the DLL registrations then work because the required dependent DLLs are now present on the system.
If the selfreg table is being used, what I would suggest is that you add a transform that removes all the selfreg entries, then try registering the DLLs manually in the same order after installation (assuming no errors this time) and see what happens. If you get an error using REGSVR32.exe on a specific DLL, go on to the next one until all have been done, then repeat the one(s) that failed and see if they work this time. If this does work, then you need to return the package to the packager as a QA fail and have them sort out the problem.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
SelfReg is evil
Insofar as installations (and uninstallations) are concerned, self-registration is pure evil and should never be used*. It shouldn't be used by Windows Installer, it shouldn't be used by WiseScript, it shouldn't be used by InstallScript, it shouldn't be used by Inno Setup. Not on a plane. Not on a train. Not on cocaine. I would not SelfReg here or there. I would not SelfReg anywhere**
* Note: I didn't say that self-registration should never be used under other non-installation circumstances. For example: If you've identified a group of machines that appear to have already had their registry damaged by a less-than-stellar uninstall routine (registry rot), it could be entirely appropriate to self-register. Although...due to self-registration's legendary fragility, it would still be mentally deficient to do so; why would you not instead extract the registry and deliver it in a 100% guaranteed working fashion? Seriously, I'll give a no-prize to anybody who can bring up even just one situation where self-registration is the right answer. And, no, "I'm too lazy to extract the registry" is not a valid answer :)
Microsoft has a fair bit to say about why you shouldn't ever want to use self-registration. Just open MSI.chm and read the entry for the SelfReg Table (or click this handy-dandy link)
**Note deux: I've heard that SelfReg is a leading cause of chronic ocular deterioration
-Evan
Thanks Edt.
Thanks Edt & Evan.....
It seems that dependent DLL is was installed at the time of installation, so what i did is that created a batch file to run after reboot, once installation is done, to register the all dll's. it is working fine but i will run more test to make sure everything is ok!
You shouldn't band-aid the
You shouldn't band-aid the far-too-fragile self-registration. Instead, a far more reliable method would be to use WiseCOMcapture to extract the registry and then install as you would any other registry (go to the Setup Editor > Components tab and add the registry to the component which contains the DLL file).
WiseCOMcapture can be found in: C:\Program Files (x86)\Symantec\Wise Package Studio\Windows Installer Editor\WiseCOMCapture.exe
It's a command-line tool that reaches into a .DLL or .OCX and pulls out the self-registration, storing it in a .reg file. Using WiseCOMcapture is typically faster than running a SetupCapture and registering the file between the snapshots (using regsvr32.exe), but both ways work. Here's the command-line:
WiseCOMCapture.exe /r /u "C:\My Awesome App\whatever.dll" "C:\Needed_Registry.reg"
Note: There is a maximum file size for the .reg file that WiseCOMcapture creates...It's either 32kb or 64kb (I can't remember)...so if you see one of those file sizes and the registry abruptly cuts off at the end of the file, you know it contains too much registry for the WiseCOMCapture utility (but it is somewhat rare that any one file will have that much registry in it). In these situations you should use SetupCapture to capture the results of using regsvr32.exe. You can then go into the Windows Installer Editor > Installation Expert > Registry page and right-click and choose Export to .REG file. You can then import that .reg file into your main .msi. You should go to Windows Installer Editor > Setup Editor > Components and highlight the component containing the .dll file. Then right-click and add new registry, and finally right-click on the registry icon and choose Import from .REG file...by doing this, you are keeping the registry in the same component with the .dll it services (otherwise the uninstall can cause registry rot, even if the .dll component is still being shared or is set to never uninstall).
And, for those using Wise Installation Studio instead of Package Studio (and thus do not have SetupCapture), I recommend using the free InstallWatch Pro 2.5 utility to capture the registry.
**************************Directions for obtaining InstallWatch Pro 2.5**************************
InstallWatch Pro 2.5 can be downloaded from http://www.brothersoft.com/installwatch-download-9407.html
The real download link is near the top of the screen: It's green and says Download 3.70MB. Be careful not click the green Start Download button at the very top, as that's an ad for Google Chrome...actually I'm quite fond of Chrome, so maybe you should also click that button :)
Now it'll download a file named Brothersoftdownloader_for_InstallWatch.exe
Run that file and it will launch the GetRightToGo download manager, which will download two additional files: InstallWatchPro25.exe and Integrated_CT(Bunch of numbers).exe
Next it'll automatically launch Integrated_CT(Bunch of numbers).exe, which launches Brothersoft Extreme, some sort of Brothersoft toolbar app that you want no part of (and it uses an ancient version of WiseScript for its install, not even bothering to embed a .manifest file telling it that it is Windows Vista/7 compliant); cancel out of the install. Next, open Task Manager and kill the Brothersoftdownloader_for_InstallWatch.exe process.
The installation of InstallWatch Pro 2.5 will now automatically launch.
Surprisingly, there is little leftover junk from the GetRightToGo download manager. All you need to do to clean everything off is to delete the three files mentioned above and then open Regedit and delete HKCU\Software\Headlight\GetRightToGo\
-Evan
Evan, there is less work if
Evan, there is less work if you just download the file directly http://files.brothersoft.com/software_developer/setup_generators/InstallWatchPro25.exe
Holy crap, that's a lot less
Holy crap, that's a lot less work! Where did you find the link?
-Evan
It was right in the link on
It was right in the link on the download page where it says "No download? Check for your browser's security bar at the bottom of the page.or Click here."
I just edited the link and took away the unnecessary Brothersoft downloader part.
I always use NoScript, Flashblock and Adblock Plus in my browser, so maybe I get to those real links more easily (leaves out most of the crap on web pages).
Nice summary Evan :-)
Nice summary Evan :-)
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Would you like to reply?
Login or Register to post your comment.