Upgrade is not working at all, installing another version of application (Wixsharp, custom Bootstrapper) - upgrade

I'm new to wix/wixsharp and bootstrapper. I created an installer and providing ProductID, UpgradeCode and version. Installer is working fine but when I'm creating new installer and giving different version it is simply allowing user to install the another version of application and bot can be seen in program files.
If I use the same file that was used earlier to install, it gives option to uninstall as expected but when I use the upgraded file it does not give upgrade or repair option.
Can anybody help me with this. Here is the code I'm using
project.UpgradeCode = new Guid("9fa9fcf6-e807-404d-a67a-d66f1a60ca53");
project.ProductId = new Guid("0b2d7210-32ce-4095-9c46-aaccb1bf0733");
project.Version= new Version("1.0.209.10040");
project.MajorUpgrade = new MajorUpgrade
{
Schedule = UpgradeSchedule.afterInstallInitialize,
DowngradeErrorMessage = "A later version of [ProductName] is already installed. Setup will now exit."
};
In 2nd build I'm just changing Version("1.1.209.10040") keeping everything else same.
Please let me know if any other part of code is required as I'm really new I'm not sure I shared all the necessary information.

If you're trying to do a major upgrade you will need to change the ProductCode. Whenever you're building an upgrade you should refer to the Windows installer Upgrade page that MS publishes. I don't know if there is a specific one for WiX but the same concepts still apply.

This worked for me. I changed ProductId and then I am able to auto-upgrade my Product based on version# (first three parts).
project.ProductId = Guid.NewGuid();

Related

Create upgrade setup using installshield 2010 primier

I want to create an upgrade setup. I have an old setup with for example version 1.0.1.43 and my new setup will has version of 1.0.1.45
I have created a new basic MSI project in installshield. I set version to 1.0.1.45 I copied both product code and upgrade code of old setup into upgrade setup. I also added all of new files in setup that should be replaced with files of old setup. I selected all files and then right clicked on them and in properties checked always overwrite option. then in Media section I added a major upgrade with upgrade code of my old setup. then I build the setup.
when I run this setup it shows me that you have installed this application do you want to upgrade it or not? then I choose yes to upgrade. after installing this setup I figured it out that in add/or remove programs version of my application has changed to 1.0.1.45, that means it has been upgraded. but when I check files I see that none of new files has been replaced with new one.
Where am I wrong that this setup ignore all of my new files to replace? I want this setup find old path of old setup and after removing all files, add new files to that path?
thanks
As you are saying, you have created new MSI installer for upgrade. So in this case the component ID of components in which your files are present, got change. So you need to set values of Component ID with the component IDs of your installer 1.0.1.45. Or you need to create different components with the same target path.
Also you can validate your upgrade build 1.0.1.46 with the main build 1.0.1.45 with following steps.
Build Menu -> Validate -> Upgrade Validation Wizard
Then give path of your main installer (msi/exe) and your upgrade installer (msi/exe). And check what differences both builds are having.

How to ensure exact version of Installshield setup.exe is installed by Powershell DSC

I'm trying out Powershell DSC as a way of automating deployments. We have an EXE installer created by Installshield for a server application, and need to ensure the latest version is installed.
Installshield guidelines (http://www.flexerasoftware.com/producer/resources/white-papers/is-msipatches.html) suggest that the Package Code should change for every build, the Product Code should stay the same between minor versions, and the Upgrade Code should always stays the same.
Is there a way of telling Powershell DSC to install a particular minor version, i.e. to make sure that the Package Code matches exactly?
I'm using the following to create the MOF, but when I run it, it detects the Product as already installed and doesn't do anything, even though it's a different Package.
Package MyApp
{
Ensure = "Present"
Name = "MyApp"
Path = "\\path\to\specific\version\of\setup.exe"
ProductId = ''
Arguments = "/V`"ADDLOCAL=ALL /qb`""
}
The package resource will declare the resource as correctly configured if the package is already installed. So it will not work for your specific scenario. You will have to write a custom package resource or extend the existing one. If you want to modify feel free to fork this repository and extend the functionality https://github.com/PowerShell/xPSDesiredStateConfiguration You can also open an issue for someone to pick up and fix the same.

how to put to work Ionic generator?

I have an Ionic app running with the basics of Ionic and running it in the browser by doing ionic serve, but I want some new stuff and run it trough the grunt serve command, also has the feature for JSLint, I am already using this scss this: https://github.com/diegonetto/generator-ionic/ and I see that have everything I want, how do I install that in my project?
Take into account that my project is almost done, I have almost 85 % already done.
Is this the part I need to follow up:
Upgrading
Make sure you've committed (or backed up) your local changes and install the latest version of the generator via npm install -g generator-ionic, then go ahead and re-run yo ionic inside your project's directory.
The handsome devil is smart enough to figure out what files he is attempting to overwrite and prompts you to choose how you would like to proceed. Select Y for overwriting your Gruntfile.js and bower.json to stay up-to-date with the latest workflow goodies and front-end packages.
does this will bring some complications ? is there something else I need to know ?
I use the same generator and enjoy using it. With that said, I would not recommend starting to use a generator until you've made a complete backup of your project.
Even then, I'd recommend creating a brand new project using the generator then migrating your existing code into the newly generated project. While migrating, you should be modifying your code to match the generator conventions as you go. This gives you the most control and will make sure that you learn the conventions of the new project structure. Upgrading instructions are really meant for people who already use the generator and are just upgrading to a new version of the generator. They are not applicable to you.

How do I disable automatic updates for Azure VM extensions?

We have a few VMs in Azure and we rely on the PowerShell DSC extension to deploy our code to the machines. I want to make sure that this extension is not updated automatically so that our code that uses functionality from this extension don't break without we knowing about it first.
The problem is that we have some deployment scripts that read the extension's status codes/messages and do custom logic based on them. When the extension was updated from 1.4.0.0 (which is the version that the plugin was on when we first started using it) to the version 1.5.0.0, some of the status messages changed and our script stopped working. This completely broke our deployment process and we had to do an emergency update on our scripts to be compatible with v1.5. Now that version 1.7.0.0 was released the same exact problem happened again. Some new status codes were added and I had to update our scripts or we would not have a working deployment pipeline.
Is it possible to specify a manual update process for these extensions? Their installation and update seem to be completely automated. Ideally, I'd like to be able to update them on a case by case basis after testing our scripts against the newer versions first, so that our deployment process is not halted because of that. Bonus points for anyone who manages to find up to date documentation or some kind of release notes document for this extension in particular, as I could find none... I was just surprised to see that version 1.7 was installed today when I got an error from our script, and was lucky to know exactly where to look for the status changes.
The default behavior for the DSC extension handler is to update to the latest version. If you want to tie yourself down to a specific version, then you can do so with the following cmdlet (currently there is no provision from the UI)
Set-AzureVMDscExtension -Version
Please note that we are also try to ensure updates do not cause issues. We are not there yet but we would certainly like to get there so everyone is automatically updated.

How to validate an upgrade before installation

We have an eclipse feature that is licensed and the license is handled by our own code. The user can go in on our update-site and upgrade his feature. The problem we face is when the user's license needs to be updated before he can use the new upgrade.
What I want to do is to validate the feature version against the users license and warn the user that his license needs to be updated before he install.
I thought I would do this using a custom eclipse p2 touchPoint action validateLicense.
Example:
My code is called, where I validate the version against the user's license. If it fails I warn the user and he can then cancel the installation.
So my first question is:
Do I get this right, or is it some other way to do this?
My second question is pretty basic:
Where do I tell eclipse to run my code?
I have looked here at eclipse help where they explain what it is. But I don't understand where to put the information to run my code? Is it in the feature.xml.
Lastly:
Is there an example how to create and use p2 touchPonts?
I implemented a custom action as shown here and I have a system that seems to work. I left out "touchpoint" extension as it's unnecessary in my case, but the rest is the same.
My action is executed during install phase of my feature (instructions.install) but maybe configure phase could work too. Collect phase did not work.
The action is executed during installation process, after the download was already performed. Ideally it would be before the download but it's not a big issue for me. Returning an error status from the action cancels the install. It leaves some downloaded files around but they do not get activated and are probably removed later by p2's garbage collector.
I also managed to do some more interesting things. My actions plugin has a dependency (optional and non-greedy) on my main plugin. So the install works like this:
Actions plugin is downloaded
Custom action is executed
The action detects whether my main plugin is already installed and if yes, it calls into it to retrieve licensing info. The main plugin has to expose an API for the action. The action also checks main plugin's version to detect whether the API is there or not.
The action now can decide whether to proceed or cancel the install. It can even interact with the user using Display#syncExec (this is what the code in checkTrust phase does so I think it's safe). If needed, the action could also detect whether the install is headless.
Some gotchas:
Action itself must be versioned. It's the version you declare in plugin.xml and p2.inf files and it's different from plugin's version. I just replace 1.0.0 with the same version my plugin has. This way the latest version of the action plugin is always downloaded before being executed. This is great because now any problem changes to licensing rules can be implemented in actions plugin.
Actions API changed between Eclipse 3.5 and 3.6. I will probably drop support for 3.5 as it's pretty old anyway.
Actions plugin should probably be signed. It's the case in my case. The system seems almost too powerful to me as just pointing Eclipse to an update site gets it to execute downloaded code.
I still need to test how this works with different versions of Eclipse and other IDEs. I saw a strange (non-blocking) error with 3.6. However the results are promising and it looks like the system might actually work.
Touchpoints are executed at installation time, which means that the resolution (validation) has already happened. I'm not sure they would help. What about creating an Installable Unit (IU) (or Eclipse Feature) that represents the license the user has installed. Then you would put a dependency from your product to that license.
For example, create an IU called com.mycompany.license (1.0.0). You would create another one called com.mycompany.license (2.0.0). When you installed a license, the appropriate IU would be added to the profile.
Now, when you go to install you product, the new version of the product would require license version 2.0.0. If this license was not installed, the resolution would fail.
Does this make sense? Do you think this would help?