Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After a long research I found a way to solve the issue. I made a version of the application on .Net 4 and generated the installer. Installed it and then compared the .msi file the application saves on the C:\Windows\Installer folder with the previous version of the same file but with .Net 3.5 ( original installation). Then open both files with Orcas and changed some property values and a couple of binary files on the .Net 3.5 msi file from the new .Net 4 msi file.<br> Now when I make an update of single files in the App to a .Net 4 version of them( so the app runs under .Net 4) I also need to change that uninstall .msi file located under c:\Windows\Installer and then when uninstalling the Windows Installer will invoke .Net 4 to do the custom actions instead of .Net 3.5 which was the original build when the app was installed.</p> <p>Here is a script that automates the process and no need to use orcas, just pass the msi file to change and the two necessary Dll ( which I extracted from the msi of the .Net 4 version). </p> <pre><code>var installer=new ActiveXObject("WindowsInstaller.Installer"); var db; var msiOpenDatabaseModeTransact = 1; var msiFile = WScript.Arguments.Item(0); var installbuildfile = WScript.Arguments.Item(1); var auxDllFile = WScript.Arguments.Item(2); database = installer.OpenDatabase(msiFile, msiOpenDatabaseModeTransact); var view = database.OpenView("SELECT Name,Data FROM Binary"); view.Execute(); var rec; for (rec = view.Fetch(); rec != null; rec = view.Fetch()) { WScript.echo("Current SmartUpdater.exe version is: "+rec.StringData(1)); if (rec.StringData(1) == "InstallUtil") { rec.SetStream(2, installbuildfile); view.Modify(2, rec) WScript.echo("Changed: " + rec.StringData(1)); } if (rec.StringData(1) == "MSVBDPCADLL") { rec.SetStream(2, auxDllFile); view.Modify(2, rec) WScript.echo("Changed: " + rec.StringData(1)); } } view.Close(); view = database.OpenView("UPDATE Property SET Value='v4.0' WHERE Property='VSDFrameworkVersion'"); view.Execute(); view.Close(); database.Commit(); </code></pre> <p>The InstallUtil dll file can be found on the .Net directory under c:\Windows for the 4.0 version, the second one named MSVBDPCADLL is still a mistery for me, but I could extract it from the MSI of the generated .Net 4 ( there can be differences for 32 and 64 versions, probably you will need to extract the different versions of the Dlls)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload