hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Hello Dan,
I have questions about the patch scheme. It automatically figures out the delta. It is great. That is what I would like to accomplish. I like to know does it figure out when files are being deleted from the target disk. Also, how can i do a rollback of the delta that I will be patching? Does it captures the history of the delta in some kind of log?
Thanks in advance.
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Dan,
Another question which related to the whole build process. I have product which is good size and being deployed as full product each time. However, each time the build number changed, it will be treated as a complete different deployment location.
For example: first deployment c:\Program Files\CompanyABC\1.10.1, second deployment, the build number changed c:\Program Files\CompanyABC\1.10.2. SO, now the target machine has 2 different folder locations with the same products. This is what we like to achieve. The method I am doing now is to manipulate by generating upgrade code each time. Is this the right approach? If it is, how do I set it up in the Advanced Installer so it automatically changed the upgrade code without manual intervention.
Please advice.
Appreciate for the assistance
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Hi Amanda,

First of all I apologize for my delay reply.

Please keep in mind that the UpgradeCode is a GUID representing a related set of products. A set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.

However, you can generate a new ProductCode. This way, your installation package will identify(based on the UpgradeCode) if there is a previos installed version and if it is, it will be uninstalled first and then will continue with the installation of the current version. Also, Windows Installer allows only one program with a given product code to be installed on a computer at a time. It will prevent the installation of a second MSI with the same Product Code as a currently installed one.

Also, during an upgrade the original installation path will be used (if this option is checked in the Upgrades page). By default a package uses the installation path of an older version when upgrading. If this option is unchecked, during an upgrade the package will use the Application Folder path defined in Install Parameters page, ignoring the original one.

Please take a look on the Product Identification article and on the Changing Version article for a better understanding.

In order to automate your build process you can use a file of commands where you can specify a text file containing a series of edit commands that will be executed in sequence.

In order to execute a file of commands you can use the following syntax:
AdvancedInstaller.com /execute <path_to_project_file> <command_file_path>

Here's the command file which you can use to increase the product version:

Code: Select all

;aic
SetVersion -increment
Save
Rebuild
Please note that a new Product Code will be generated if the new version is different from the old one, unless the -noprodcode option was used.

Also, in the Media page you can rename your builds accordingly to you ProductVersion (e.g. buildName[|ProductVersion]).

Please let me know if that helped, otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Happy New Year to you, Dan.
Thank you for the explanation. I found another alternative for what I would like to do. I have a couple of products are installed full version every time, since their sizes are small. So, in order to be able to install separately physical location each time due to build version increment, I went and selected option "Allow side by side installs of different product versions". It works very well so far.
However, i would like to know is there any cons to this method. Please advice.

Another question for a product which will be installed full version, as well, but a couple of folders example, folderhelp and folderreport will need to keep and untouch each time a new full version is upgrade. Now, I believed it is best, I should use upgrade with this product rather than option "Allow side by side installs of different product versions". Please instruct me whether my approach is right. Also, let say if the management team insisted to uninstall and install a full version each time, how do I handle the folderhelp and folderreport which required not to uninstall. What is the best way to move it over to the new installation? May we do all these in one Installer?

Thanks in advance,
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Happy New Year to you too, Amanda,
 I found another alternative for what I would like to do. I have a couple of products are installed full version every time, since their sizes are small. So, in order to be able to install separately physical location each time due to build version increment, I went and selected option "Allow side by side installs of different product versions". It works very well so far.
However, i would like to know is there any cons to this method. Please advice.
Enabling the Allow side by side installs of different product versions option from the Upgrades page that means you allow different versions of the same application to be installed on the same computer.

Please note that when authoring side by side installs of different versions of an application, it is recommended that some rules should be used. The install locations, registry entries, shortcuts etc. should differ from one version to another. If they are not different, the present items will be overwritten when a new version is installed. Also, they will be removed when a version of the application is uninstalled even if the other versions still uses them.

Also, if the installation folder selected by the user is the same folder used for the installation of an older version then that version will be removed. The user can choose a previously used install location from the drop-down list in the "Select Location" dialog, forcing an upgrade.
Another question for a product which will be installed full version, as well, but a couple of folders example, folderhelp and folderreport will need to keep and untouch each time a new full version is upgrade. Now, I believed it is best, I should use upgrade with this product rather than option "Allow side by side installs of different product versions". Please instruct me whether my approach is right. Also, let say if the management team insisted to uninstall and install a full version each time, how do I handle the folderhelp and folderreport which required not to uninstall. What is the best way to move it over to the new installation? May we do all these in one Installer?
If you want to preserve some folders, then you can enable the do not overwrite existing files option from the operations folder tab and add in the Condition field the OLDPRODUCTS parameters.

In this case, during upgrade, that file will be backed up before the uninstallation of the old version and will be restored at the installation of the new version.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Hello Dan,
I did based on your advise for the Folders that suppose not to remove and overwrite. I put the condition =1 (BTW, is 1 stands for during installation?).
Also, when you mentioned about OldProduct Parameter, would you be able to provide a couple of examples. Do you happen to refer old product product code?
Thanks again for your wonder support.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Hi Amanda,

The OLDPRODUCTS property is set in the upgrading MSI if the package found an older version installed on the target machine. Please keep in mind that a set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.

So, when an older version of your application is found on the target machine this property( OLDPRODUCTS) is set, otherwise it is empty. In your case, all you have to do, is to enable the do not overwrite existing files option from the operations folder tab and add in the Condition field the OLDPRODUCTS parameters if you want to preserve some folders.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Hi Dan,
I got it. THank you for clarifying it.
I have new question on the Registries for side-by-side installation. As your suggestion, I went and carefully reviewed and tested to make sure it didn't overwrite and remove any registries of any installation. Luckily you mentioned. Yes, it didn't remove other version of the installation. THis is bad. So, for instance I have HKLM\Software\Manufracture\productone and HKLM\Software\Manufracture\producttwo. I fixed it by not allowing to remove the HKLM\Manufracture. However, let say all the productone and producttwo removed; under HKLM\Manufracture is empty. How do I tell to remove Manufracture that specific to my company name?
Thanks again for the prompt reply.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Hi Amanda,
I fixed it by not allowing to remove the HKLM\Manufracture.
If you enabled the Preserve key content option(for your “Manufacturer” key ) from Registry Key Operations Tab, please note that is not necessary, because you are using different path for the registry keys. e.g.
-HKLM\Software\Manufracture\productone
-HKLM\Software\Manufracture\producttwo

If this is not your case, can you please give us more details about your specific scenario(maybe exemplify) of give us a test case scenario so we can have a better view about this?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Hello Dan,
Thank you for getting back quickly. I believed I had the same structure you listed down before and when I uninstalled it removed both. I will double check again on Monday and get back to you on that.
Now I have another question which related to IIS Virtual Directory and AppPool. I would like to know should I concern about having 2 different installer locations, let say c:\product\build_09 and c:\product\build_10, but they both shared the same Website, Virtual Directory, and AppPool. So, introducing side-by-side installation will be a problem in this scenario.
Thanks and have a great weekend,Dan.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Hi Amanda
Now I have another question which related to IIS Virtual Directory and AppPool. I would like to know should I concern about having 2 different installer locations, let say c:\product\build_09 and c:\product\build_10, but they both shared the same Website, Virtual Directory, and AppPool. So, introducing side-by-side installation will be a problem in this scenario.
I'm afraid your need to provide different name for the Website. This field is of Formatted Type and can be edited using Smart Edit Control.
Also, the triplet setting (IP Address, Port No, Host Name) defines the Web Site binding and therefore must be unique. If you add a duplicate binding to the Web server, only one site with that binding can run at a time.
You may choose to the Use existing application pool but there is a small inconvenient. If you uninstall the application which created the pool, during the uninstall the pool will not be removed(if it used by others) but you will no longer be able to remove it. (no web app will try to recycle it).

You may use the same name for the Virtual Directory as long as it is created under a website installed by you (using the naming instructions provided above).

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Dan,
Thank you and appreciate for all the wonderful support so far.
So, you mentioned it is ok to use the same Virtual Directory name as long as the Website installed by me. Well, what if the same machine but this time is one else installed the product but happen to select the existing website which associated with virtual directory already. Is it ok to use the same Virtual Directory in this example.
Thanks again!
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Hi Amanda,

I'm afraid I don't fully understand what you mean. Can you please give us more details?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: how to make a patch

Good morning, Dan.

You made comment below:
"You may use the same name for the Virtual Directory as long as it is created under a website installed by you (using the naming instructions provided above)."

I like to clarify below your comment above.
I would like to know, let say i have a server that shares with QA/Dev teams. Initially, I created a new website=ABCProject, a new virtual directory=ABC1.1.0 and a new Apppool=ABC1.1.0.
So, later on someone in Dev team installed a newer version of ABC product and decided to select existing website=ABCProject and all its association, such as VDirectory and Apppool.
We are right now sharing the same Website/Vdirectory/Apppool. If I decided to remove my installation, I assume the website=ABCProject/VDirectory=ABC1.1.0/Apppool=ABC1.1.0 will stay intact. Correct?
Thanks a bunch and have a good day!
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to make a patch

Hi Amanda,

I'm not really sure if it is clear how things work. Let's consider this example, with the following structure:
IIS_Structure.jpg
IIS_Structure.jpg (23.97 KiB) Viewed 11044 times
Here is the IIS removal order of the package which created this structure:
1) VDirA & VDirB are removed
2) Does WebAppA have any remaining children?
2.1) If not then remove WebAppA
3) Does SiteA have any remaining children?
3.1) If not then remove SiteA
4) Has AppPoolA got any remaining registered applications?
4.1) If not then remove AppPoolA

Please note that if you create another installation package which will try to use the same WebSiteA and add VDirC will cause the VDirC virtual directory to be skipped because its parent website has been also skipped.
A disadvantage of this scenario is that VDirC will inherit parent properties which may differ from the ones you had defined in the installation package.

As a side note, the best approach for you would be to use different sites and take advantage of the Name field which is of formatted data type (e.g. Site[ProductVersion]).

If there is anything else I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”