Page 1 of 1

Registering dll's, with asking confirmation to overwrite

Posted: Thu Jan 26, 2006 7:08 am
by Naomi
I am working on an installation in the Studio version (recently purchased, so I am still new at this).

I need to register some dll's for our application (which is no problem), but... I do not want to simply overwrite already existing files. So I was thinking of making a script that checks for existing versions, compare file versions and then ask (messagebox) if our file should be used or if the existing one should remain. This is just a matter of programming, and should be no problem.

My questions are:
1. Am I overlooking a simpler/easier solution?

2. Is there a way to get a "yes to all" button in a messagebox, so all files can be registered without asking for each seperate file?

Thanks in advance,

Naomi

Posted: Thu Jan 26, 2006 7:16 am
by MichaelNesmith
Hi Naomi!

I recommend you do not take this approach. Windows Installer automatically does version checking and will not overwrite DLLs if it determines that the operation will potentially damage the system. In addition, Windows Installer will not overwrite vital system DLLs at all, if it determines they need to be updated by service pack level updates to the operating system. So, you are really safe by letting Windows Installer decide here.

However, if you still wish, you may take your own approach, of course. I'd recommend using the dialog editor to build your own custom dialog that contains a "Yes to All" button and displaying that (for capturing button click events on dialog boxes, see the CD Autorun Template). You can then show this dialog for each file you wish to manually confirm, and overwrite if Yes to All has been chosen.

Again, though, this is not the recommended best practice - the simpler/easier/proper way is to let Windows Installer decide.

Posted: Thu Jan 26, 2006 7:38 am
by Naomi
MichaelNesmith wrote:Windows Installer automatically does version checking and will not overwrite DLLs if it determines that the operation will potentially damage the system. In addition, Windows Installer will not overwrite vital system DLLs at all, if it determines they need to be updated by service pack level updates to the operating system. So, you are really safe by letting Windows Installer decide here.


Just to be sure, this applies for the "Install File" command with the option "File is self registring dll"?

Posted: Thu Jan 26, 2006 7:49 am
by MichaelNesmith
Yes - actually, applies to all Install File commands.

Posted: Thu Jan 26, 2006 8:20 am
by Naomi
Okay.

And thanks for your help :)

Posted: Thu Jan 26, 2006 11:15 am
by Gizm0
Naomi wrote:Okay.

And thanks for your help :)


If you still don't know how to do it, or you are facing difficulties, i can provide consulting services and help you create your setup, fast and easy, at a very reasonable hourly rate!

Thank you,