Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to overwrite a DLL in inno setup installer - but file not getting replaced

I am using Inno Setup for installing patch updates for my VB.net application where I have to replace a DLL file and a couple of javascript/html files for the update. However, the DLL doesn't get updated (it is in C:\program files...) - even on XP systems without UAC it doesnt get replaced, but when I manually delete the DLL and rerun the patch, the file gets copied. It is not readonly, and no UAC/admin privilege is involved in the XP case.

What could be the reason that the file doesn't get copied if a file already exists? It is built in VS2008 and in .NET 2.0 - the new DLL has a more recent date and size difference too.

Is there a way to workaround the UAC write access issue on Vista/Win7/8? I guess the patch would never succeed to replace the file on these systems with UAC on. Telling our user base to turn it off is obviously not an option.

[EDIT] The dll assembly is packaged into the setup.exe within Visual Studio by picking it up from the Release folder on building the solution. The inno setup iss [File] section has this:

[Files]
Source: C:\Visual Studio 2005\Projects\Setup5\Setup5\Debug\setup.exe; DestDir: {app}
Source: C:\Visual Studio 2005\Projects\Setup5\Setup5\Debug\interact.msi; DestDir: {app}
[Run]
Filename: {app}\setup.exe; Flags: runmaximized
like image 261
Surge Avatar asked Dec 07 '12 13:12

Surge


1 Answers

Does the DLL have a version resource? Is the new DLL a higher version than the old one? By default, InnoSetup uses the version resource to determine if a file should be replaced.
Another option is that you could add the ignoreversion flag in the [Files] section to always replace that file.

like image 169
mirtheil Avatar answered Nov 15 '22 10:11

mirtheil