changed component guid in MSI and it's causing issues - windows

I am working on the installer for a product (currently version 3). Between versions 1 and 2 (already released), the guid of a component was changed, but the keypath adn everything stayed the same (and needs to stay the same still). In version 3, I need to make a change to move RemoveExisitingProducts later in the install sequence. However, this is exposing a new bug causing the component that had its guid changed to not be installed if upgrading from version 1 to version 3. I'm trying to figure out a way around this bug. Repairing fixes the installation but I'd rather not have to repair. I think it'll probably take some kind of hack to fix it, but I haven't been successful. I tried going to HKLM/Microsoft/windows/currentversion/installer/user data/S-15-18/components/OLDPACKEDGUID and deleting it before running the new installer, but that seems to cause terrible issues and be much worse.
anyone know a solution to this issue, even if it's a big hack?
Thanks

You can try to schedule RemoveExistingProducts earlier in the sequence so that during upgrade the previous product is completely uninstalled before installing the new product.
Also look at this WiX upgrade question. And another one may also be helpful.

Related

UnityContainerExtensions.cs not found

After updating some NuGet packages, it turned out that some things in my website got broken by new code. I updated to the new Unity inversion control 5.0.0, etc. So after a while of hunting around and trying to fix it, I was able to get it to finally build and launch the site. However, the Unity IOC was broken because I kepts getting the "Error in Application '~/', controller must have a parameterless constructor". I saw that my couple of Unity files (UnityConfig.cs and UnityMvcActivator.cs) were gone, so I replaced them with ones I had in the backup folder.
Well, now it launches a loading site, but in VS it now says "UnityContainerExtensions.cs not found". I see that it looks all over for this file, around 'C:\ Program Files (x86)\Microsoft Visual Studio 14.0\VC...' and then it goes looking through 'c:\projects\unity]Abstractions\src\Utility...' - a folder that I can't even see.
This is in VS2015, doing a web application with Framework 4.6.
What can I do to just make it work again, as when I first had it so many months ago?
Alright, I was able to fix my Unity problem by rolling back on some of the packages. I'm the kind of person who likes to have no notifications, so I clicked Update All, and apparently the updates weren't necessarily compatible with my project here. To get it working again I has to bring back:
Unity.Abstractions = 2.0.0
Unity = 4.0.1
Unity.AspNet.WebApi = 4.0.1
Unity.Mvc = 4.0.1
Now to great relief, all works just as it did before!
However, I do wish I knew why the breakages happen and also why these packages are listed as updates when they are not going to work with my project.
Till the future, my system is going to have to consist of a Post-It "Do not update these xxxx packages, they will break stuff". And I wish to gain an understanding of what is the reason behind such Unity mess.

sublime text 2 portable update not sure how?

I have just (finally) started using sublime text 2, and I am liking it so far (apart from lack of intellisense / autocompletion :(, though tried codeintel but its not what I expected), I am moving from netbeans (can't afford to use it because of memory eating nature :(). Anyway My current issue is I don't know how I can use latest update of sublime text 2 (portable on windows), it kept prompting me about update and once I listened to it and it downloaded new version but there was no step involved in actually updating the existing version to new one instead I have another portable version with newer files, and my issue is i have install several plugins in the old version and I don't know how I can use those in this new version :(.
Note: It just started saying me this version has expired so thats why I am seeking help so I can use new version but with my already installed plugins (emmet, js minifier etc etc :().
I have googled alot but found no windows based guide which helps me solve my issue :(.
Thanks in advance.
Assume that your old version is installed in Sublime.old, and the new version in Sublime.new. Make sure Sublime Text 2 is closed, then move the Sublime.new\Data folder to someplace else (like your Desktop, for now), just in case anything breaks. Then, copy (don't move) the Sublime.old\Data folder to Sublime.new. Fire up the program and check to see that everything is there, and works properly. Please note that this method will not work when upgrading from ST2 to ST3, as there are major differences in the way plugins are run.

Program updating does not works properly

I have a program which has several versions. In the last version I have a problem: when I'm trying to update previous version to new one, the installer of new version removes files from previous version, but don't installs new files.
Just installing works fine, but updating process has this problem.
What can be the reason of this problem ?
Upade: I'll try to describe more detail
I have VS project where I have a project of program and an installer of this project. Till present all were working fine, but after my last big update ,the installer start work incorrectly.
And another question:
How I can debug installation process ?
I dont know which program you have. Generally programs have problems because of multible versions, because programmers arrange this. For example ;
Lets consider Microsoft Framework. If you have 4.5 you cannot install 4.0, so that with similar idea you cannot update it.
Try to delete other versions and update them and install others. Or you can also stop services which you dont want to update.Then other one will be updated without any problem.

Best Way to Create an Installation that only Upgrades?

My company is creating a cheaper version of our product that will only upgrade from an older version. To accomplish this, I would like to create an installation that will ONLY upgrade from a previous version. It will not install the full product.
Is there a straightforward way to do this? I have considered:
1) Creating a custom action that checks the registry for the old version first;
2) Creating a patch/hotfix installation
Is there a better method to do this? If not, are there any large pitfalls and drawbacks to these methods? Method #2 seems like the easier method, but this is a pretty big upgrade (though not a "major upgrade," from a technical standpoint). I don't like the appearance of a hotfix when the upgrade is no such thing.
By the way, I am writing the installer in WiX.
This really boils down to one question: does the upgrade move or remove files?
If it does, you need a major upgrade. In this case just make sure that your new version uses the same Upgrade Code as the old one. Windows Installer will take care of the old version removal.
To prevent the package from performing a standalone installation you can use an upgrade rule. You can define a rule which detects older versions and saves them in an installer property. This property can then be used as a launch condition.
If the upgrade doesn't need to remove files, you can use a patch. In this case you don't need to worry about standalone installations.

Make Visual Studio not care about DLL versions

Is there a way to make visual studio not care about dll versions? Is this a bad idea?
I am resetting up my dev machine and I just installed the latest version of Pex and Moles (version .92). All my projects are on version .91.
We are in the middle of a release and don't want to upgrade right now. Also, I cannot find an installer to version .91.
When I try to compile I get a message that I am missing the reference. (Hence this question)
The version is important.. By definition, there is a difference from each released version to the next (or there would be no need for a new version). Your program may not perform correctly if you are expecting one version and instead have another.
This was a part of what was known as "DLL Hell" in the pre-.NET days... If you needed to use a third party component (Crystal Reports Viewer is one we always had to deal with), you would just use the reference to whatever installed version was on the user's PC. Our retail locations had to have a specific version of Crystal Reports for their bookwork reports to print correctly, and because of that, we had to hold on to an old version forever.. Upgrading Crystal on the PC broke the vendor's bookwork app. On my first ever PC, I had several applications break when I would install or upgrade another. In particular, Real Player broke my telephone answering machine software. Goofy stuff like that...
So, the version IS important, even if it is an annoyance. It's also why I have a bias against third party tools that I have no code for, and can't recompile myself.
If you look at the properties of a referenced DLL, you will see a property "Specific Version". If you set it false, it doesn't track the specific version in the project file.
For this to work, you have to somehow fix the references where ever they are used. You can do this by opening every solution and fixing the references (at which time you could also just update the references to the correct version, paying heed to David's comments).
If you have a lot of solutions, you might use a tool like sed (see this post for windows versions of tool like this Is there any sed like utility for cmd.exe) to just update the project files as needed all at once.

Resources