Archive: RegDLL not working with SP2??


RegDLL not working with SP2??
Hi everybody!

I just installed SP2 on my XP machine, and all of a sudden my BHO (which is an dll) refuses to register.

There's no warning message or anything, it just doesn't register..

EDIT: It works great when registering the dll without using the installer "regsvr.exe /i DLL"

What could this be??

Please help.

Thanks!


Do you mean "with regsvr.exe" and it doesn't work with RegDLL?

-Stu


Hi!

Yes, it go to start->run and enter:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
regsvr32 /i C:\thefile.dll
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

It works fine!

But if I have the NSIS script trying to install it nothing happens (however, it does work great on my other machine which have SP1)

Here the script:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInit
SetOutPath "$DESKTOP"
File "thefile.dll"
RegDLL "$DESKTOP\thefile.dll"
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

No error message or anything.. it just doesn't install, but it gets extracted to the desktop.


Any idea??


I've been trying to fix this for hours.. help! :/


Thank you!


any help would be highly appreciated, I'm going nuts!

thanks


Here are some miscellaneous comments that might help:

In your example, you say you used Regsvr32 to register the file. You say you used the command:

regsvr32 /i C:\thefile.dll
However, I noticed that in your actual script, you used a slighly different path.
RegDLL "$DESKTOP\thefile.dll"
. Therefore, my first suggestion would be to change your installer to use the same path as your REGSVR32 test command line and see what happens.

Another thing you might try is looking for the error flag after calling RegDLL. (According to the documentation, the error flag is raised if the DLL could not be registered. But this does not mean that an physical error will be generated.) Try adding this bit of code directly after calling RegDLL:

IfErrors dllFailed dllOk
dllFailed:
MessageBox MB_ICONEXCLAMATION|MB_OK "DLL Register failed!"
Goto end
dllok:
MessageBox MB_ICONINFORMATION|MB_OK "DLL Register OK."
end:
FunctionEnd

This will allow to to detect if there are actually errors or not.

Finally, I'd make sure you that you are logged into the XP box as an administrator. Security seemed to be a driving force behind SP2. You may not have permissions to do the things you once could before. By being logged in as admin, you'll have removed one more thing from the list of "unknowns".

Hope this helps!;)

Thanks a lot for your help comperio, however, nothing helped :( Actually, I'm even more confused now..


I added the code you supplied right after the RegDLL, and nothing happened..

Since I have tested all of this with a silent installer, I didn't know of the fact that the installer simply exit when trying to Reg the dll!

Now why is this?

I checked, and I'm still Administrator..


Could it be that there's something wronf with the DLL? But would some issue with the DLL really make the installer exit without any message?



Gee.. I'm banging my head over here.. =)


Thanks!


OK, I just solved it:

Applications compressed with the popular application/encryptor teLock, can't be executed/registered by an NSIS installer on SP2.

I think...


<<edit>>...
(I originally replied with more troubleshooting, but then saw that you figured it out, so I deleted my reply...)


:)

Thanks anyway! I appreciate it!