The previous week had been really busy. With five new recruits on board, I was asked to give them a quick introduction to InstallShield X and Windows Installer. It was broken up into 5 sessions, 3 hours each. And of course, I had my routine to take care of. So, after all this hard work, I decided to pamper myself with a movie the weekend. Before that I have decided to write something about designing upgrades with Windows Installer and WIX. I have split this article into two for easy consumption.
Designing upgrades are fairly basic and I have seen a lot of people in the forum having a little trouble getting started with the upgrades. But once they understand the concept of upgrades from the Windows Installer's perspective, it becomes a cakewalk. So, for starters, let me just talk about the different types of upgrades that you can perform with Windows Installer and implement the same using WIX. This article is designed only to be a quick start guide and is no means a complete guide for an upgrade. If you want to know more about upgrades, read the Upgrades and Patching section of the Windows Installer SDK documentation.
Windows Installer keeps track of products and packages using GUIDs. There are three important GUIDs that you need to know to understand upgrades.
- ProductCode - This uniquely identifies a product. This value is written to the Property table under the name ProductCode.
- UpgradeCode - This GUID is used to logically bind related products. This value is written to the Property table under the name UpgradeCode.
- Package Code - This uniquely identifies a package. Almost any change in the MSI package, mandates a new Package GUID. This value is written to the summary information sream under the name of 'Revision Number'.
And then there is the ProductVersion property, which specifies the version of the product. Windows Installer recognizes three types of upgrades. In all these upgrades, the package code will always change.
- When the upgrade just changes the application files but does not change the Product Code or the Product version, it is termed as a small update.
- When the upgrade changes only the ProductVersion but does not change the ProductCode, it is termed as a minor upgrade.
- When both the ProductCode and ProductVersion changes, it is termed as a Major Upgrade.
The small update and the minor upgrade can be installed over the existing installation. Usually, they only make changes to the parts of applications that have been changed. There are usually no major design changes to the product tree, excepting a few additions and modifications.
The major upgrade however, installs a completely new product and uninstalls the existing version of the product(s). Minor upgrade and small update can be targetted only at a particular product but Major upgrades can target more than one product. Major upgrade usually would have major changes made to the product tree. There might be situations that you might have to change the product code. In those cases, you would have no other choice but to perform a major upgrade.
So, as long as you do not have to change the product code, you can perform a small update or a minor upgrade. Minor upgrade would allow you to track the upgrade applied by looking at the ProductVersion. You can apply a minor upgrade or small update using the following command line.
msiexec.exe /i
The value of the REINSTALL property is a list of features delimited by commas that are to be reinstalled. The features listed must be present in the Feature column of the Feature table. The REINSTALLMODE property is a string containing letters specifying the type of reinstall to perform. Options are case-insensitive and order-independent. This property should normally always be used in conjunction with the REINSTALL property. However, this property can also be used during installation, not just reinstall.
To design a major upgrade, you would have to author the Upgrade table. The upgrade table allows you to filter products and subsequently features based on the UpgradeCode, ProductVersion and Language. The Remove column of the upgrade table can be used to specify the list of features to be removed. Windows Installer will remove all the features, if the column is null. The ActionProperty column can be used to specify the name of a property. For the major upgrade to work, you need to have FindRelatedProductsAction and RemoveExistingProducts action in the InstallExecuteSequence table. The FindRelatedProducts action reads the settings in the upgrade table and stores the matching ProductCode(s) in the property specified by the ActionProperty column of the Upgrade Table. The RemoveExistingProducts action removes the product during installation. The most efficient placement for the RemoveExistingProducts action is after the InstallFinalize action. However, tools like InstallShield X, sequence this action in between InstallValidate and InstallInitialize actions.
To be continued...

10 comments:
Hey Vagmi, Thanks for your time and efforts. This is much helpful. Looking forward for the remaining part. -Bhuvana.
The article is to the point and gives a clear difference between different types of updates.
Good job
group
HI Blogger
After a good read on blogs like this I like to leave little tips on goal setting. You know, the things you used to dream of when you were young, or even now.
A lot of research has shown that only those who set goals are likely to achieve their dreams.
When is the last time you really sat down and wrote a few short term and long term goals down?
What? It's been that long!
A new year is coming. You could do the same things you did this year and achieve the same results you did with your life dreams last year…
…or you could visit Effective Goal Setting and read all the FREE information on setting goals and getting what you want out of life
OR
you could just piddle on through life hoping for the best, like most people do.
Which will it be?
You really can have a lot more of everything than you do now. All you gotta do is know what you want and have a plan.
Have a GREAT New Year!
I like to leave a little “wisdom” to jolt your into thinking about goals you may have set over the past few years, months and days, after a good blog read.
Not earth shattering by any means, and probably know this, but have you actually practiced it lately?
You know – gnitteS laoG
Jot down a few new ones today or visit a few old ones that would make you a better person, better business person or a better provider or some you haven't been able to keep for some reason or other.
Today’s tidbit…
There is a difference in setting your goals and setting them effectively. Anyone can set a goal, but doing it effectively means that it will actually get done.
There are so many things that you can do to better your life, but if you don't know how to go about it you are stuck.
The following guidelines will help you to set effective goals and help you manage your time in an efficient manner that will cause those goals to become reality.
State each goal as a positive statement
Express your goals in a positive way. That is a key component to setting goals that you can attain.
How often have you been excited to accomplish a goal that didn't even sound good when you brought it up? If you are not comfortable or happy with the goals that you have set, the likelihood of you succeeding is pretty low.
If you want to express your goals in a positive way, you simply have to first think of a goal that puts a smile on your face when you imagine it completed. Why would you want to set a goal that made you frown, cringe or cry?
When you are beginning to set your goals it helps when you are talking about them to others in a manner that states your actions as positives because it will have others seeing it as a positive as well.
That will garner you a great deal more support. In the end, don't we all need a little support when we are trying to do something positive in our lives?
Be precise
Set a precise goal that includes starting dates, times and amounts so that you can properly measure your achievement.
If you do this, you will know exactly when you have achieved the goal, and can take complete satisfaction from having achieved it.
Being precise in setting your goals is no more than setting them with exact details. It is easier this way because then you can follow a step-by-step format. That's all there is to it.
Set priorities
When you have several goals, give each a specific priority. This helps you to avoid feeling overwhelmed by too many goals, and helps to direct your attention to the most important ones and follow each in succession. Setting priorities will force you into the step-by-step format above.
By doing the most important first and moving to the least important in succession, you are enabling each task to be easier than the last. It causes the accomplishment of each task to get easier and easier which will encourage you to complete your goal.
There’s a few more “tidbits” for you at Lifetime Goals
Don't worry, they're FREE!
Enjoy your day – And have a GREAT one!
By the way, learn how to Make New Years Resolutions you can keep there also.
I was wondering if you could place a note of your great knowledge on our Quick Payday Loans , Loans, No Fax Payday Loans & Fast Loan. ur presence and comments will brighten our blogs. please share with us.
We found Nice and clear knowledge from your Designing Upgrades - Part I. Though we were looking for payday loans but we found your blog. But its worth reading on your blog and i have left a piece of note on it about my No Fax Payday Loans & Loans site . Please share your thoughts on our blogs as your visit is valuable for us and we would welcome your visit to us
What a great blog on Designing Upgrades - Part I . we read the comments and it was fun. we welcome you to our sites at No Fax Payday Loans & Fast Loan and place of piece of your knowledge on it. Your comments will brighten our blog.
Well you never know what interesting things are out
there to see, until you see a blog like yours.
Looks good! Keep it up!
Come see my site/blog if you like
##independence## it may be of##Future## interest to you.
If you find the time.
Phil
I recently came across your post and have been reading along. I thought I would leave my first comment. I don't know what to say except that it caught my interest and you've provided informative points. I will visit this blog often.
Thank you,
Eldon
Small Business Loan
Great Post!
Merchant Cash Advance
Post a Comment