+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: DLL not registering -- Win7

  1. #1

    Default DLL not registering -- Win7

    Probably the same problem we discussed earlier this month (3 March?).
    My installation appears to install without problem, but when I run the app it gives an error -- due to a DLL not being registered. (SB8 should register it).

    If I manually register it using cmd box, regsvr32.exe ..... this succeeds (if I run it in elevated mode). And after that my app runs perfectly.

    This installation gets shipped out to lots of people. About 1% seem to report this problem. Usually if they just repeat the installation a few times it does eventually work.

    I'm thinking of supplying a batch file with the program for people to use to register the DLL after installation (no, only joking -- but that does seem a solution :-).

    Any ideas??? SB8 attempts to register the DLL and (presumably) does not know it has failed. I do have a PC here where this occurs, so I can test anything you suggest.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: DLL not registering -- Win7

    Chris,

    It is not SetupBuilder that registers the DLL ;-) It is the DLL that registers itself and this fails. So you have to find out why this self-registration process fails on some machines ;-) Unfortunately, there is absolutely nothing SetupBuilder can do here. You can send me that DLL and I can try to debug it to see what might cause the failure in your DLL.

    Friedrich

  3. #3

    Default Re: DLL not registering -- Win7

    Further information.
    PC is Win7 professional 64bit. My app is 32bit.

    I have changed the setup script to add "Register DLLs Immediately" after each of the two DLLs of mine (instead of at the end "Register all pending...") I think this now makes it work OK.


    Also: I have the DLLs, OCX, etc set to only install if version/date is older than existing. I try installing it several times (and restarting PC after). But still, EVERY TIME I get the message after completion that PC must be restarted to complete the install. Why?

    I have tried turning UAC off. Turning all anti-virus/ security software off. No difference.

    These problems only seem to apply to Win7 Pro 64bit.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: DLL not registering -- Win7

    Chris,

    Again, it is not caused by SetupBuilder

    But see this:

    http://www.lindersoft.com/forums/sho...3710#post73710

    Perhaps this can help in your case. The latest SetupBuilder runtime calls OleInitialize() before it launches the registration process in the DLL. Some older/buggy DLLs need this call.

    You can download the Development Build here:

    http://www.lindersoft.com/downloads_licensed.htm

    Friedrich

  5. #5
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: DLL not registering -- Win7

    Quote Originally Posted by Chris View Post
    But still, EVERY TIME I get the message after completion that PC must be restarted to complete the install. Why?
    Because you replaced a locked (in-use) DLL. Not a good idea! Windows needs a reboot to replace the file.

    You should check (before you continue with the real install) if your application is active.

    Friedrich

  6. #6

    Default Re: DLL not registering -- Win7

    Thanks Friedrich,

    As far as I can see there is no In Use DLL. I restart the machine. None of my DLLs are loaded at startup. Check Task manager. Run SB8 Installer to install update (DLLs are set to check version/date). At the end Requires Restart.
    (I do not restart. Try app. It runs fine).

    Repeat all the above. At the end, Requires Restart.


    Repeat all the above on a WinXP 32bit PC. Does not need to restart.

    OK, I will do some more tests. Comment out DLLs one at a time and see if it is just one.
    Just wondered if anything other than "DLL in use" could cause Windows to say Restart Required.??

  7. #7
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: DLL not registering -- Win7

    Chris,

    In fact, it's very simple. If a file to be replaced is locked (in-use) then Windows needs a reboot. It only requests a reboot if the file can't be replaced because exclusive write access is not possible (file is locked/in-use).

    You can very easily check this. If the reboot message comes up, simply check the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager->PendingFileRenameOperations

    http://technet.microsoft.com/en-us/l.../cc960241.aspx

    There you'll find the file(s) that need(s) to be replaced at next reboot.

    Hope this helps a bit.

    Friedrich

  8. #8

    Default Re: DLL not registering -- Win7

    Excellent, Thanks Friedrich.
    (though I would point out that your "Very Simple" is for the rest of us humans = "possibly quite hard" :-) :-)


    If SB8 is set to install a DLL, but check version/date. Could this trigger it to be Registered by the Register All Pending .... ?
    ie. if it does not need to be replaced, does nothing happen, or does it still get registered??

  9. #9
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: DLL not registering -- Win7

    What I meant to say was "the explanation is simple" <g>.

    If the installer does not replace the file and you have the "Register as OCX/DLL/EXE/TLB" Advanced option in the "File Properties" marked then the "Register all pending file operations" function will not execute the self-registration process in your DLL.

    The one million dollar question is, why are files "locked" in your case. BTW, Task Manager can't be used to check if there are locked files. I would suggest to run the install and then at the end (when the install displays the reboot message, but before doing a reboot) check the registry key to find the names and location of the in-use files.

    Friedrich

  10. #10
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: DLL not registering -- Win7

    BTW, if you are interested, you can send me the DLL and I'll test it here on our Windows machines (we have several clean Windows VMs in our office).

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •