TWebUpdate - can DLL registration be performed?

Is it possible to set up to register DLLs as part of an update using TWebUpdate?

There are 2 scenarios where we may need to have COM-dlls registered as part of an update

1. We occasionally need to add new dlls to a system as part of an update. The dlls need to be registered.

2. Some DLLs get extended with new interfaces. In order for those to be seen the DLL needs to be re-registered.

Is it possible to set this up within the automated update? Given that the exe and dlls are replaced with elevated privileges (after the user has confirmed at the UAC prompt), it would seem that the access privilege may be available, however I guess that is for wusetup.exe. If that program handles it, we may be OK, I just don't know how I would go about setting this up.

Otherwise I guess I would have to set up for some other application to run (probably with another UAC prompt), but that would have to run before the exe is restarted.

Any help greatfully received. Thanks in anticipation.


In TWebUpdate itself, there is unfortunately not a built-in function to do DLL registration. It is indeed best to have a small custom app started after the update that handles this. You could set this EXE under [application] appname=.... and then have this custom small EXE start the application itself after it did registration.

Bruno. Thanks for the swift reply and for confirming that I had not missed anything. Not sure if it is something you might want to consider longer term, as it is something I could see being of use to others. While it is possible to use a custom app etc, it would be nice if it was an all-in-on solution inside the TWebUpdate control. It might be for example that you could add "Register" key on a per file basis.

Anyway for now that is not an option. In fact I do have a console app I built to allow for registration of dlls and ocx files, but obviously it needs to be run as admin. I bit the bullet and built in a manifest to get the UAC prompt, rather than having to rely on the user to explicitly run it as admin. This will allow us to run it as part of the auto-update.

However it is a general tool and I would like keep it that way, so hard-coding to run another app afterwards does not seem a very clean solution. I guess I could add a further command line parameter to it for chaining any other application afterwards. However if there was a way of getting the update to run one then the other it might save me that work. I don't see a way, but maybe you know of one...

Many thanks


We've added it on the feature request list for consideration to add such register option in a future version of TWebUpdate.

Thank you.

For now I am sorted out. I have our DLL registering application sorted out with a command line switch to chain load any executable file.

It is set to raise UAC provilege to admin and that is all working smoothly. I have changed the restart parameter to use this and it all works very smoothly. With the change to using a single CAB file I have greatly simplified the update control file, and it does not need to change much if we add new dlls now.

descr=Main Application and DLLs

appname=Our_RegSvr.exe -c"Our_Application.exe"