Commonly Shared Files
I am making a package using Wise Installation Studio 7.0. There are xml files which are needs to be used by the different products. When i uninstall one of the product then how can i retain the commonly shared xml files. Currently when i tried to uninstall the product even the common file is also getting removed. Could anyone please help me, how to maintain the counter of these files or how keep track of the files which are commonly used by the different products
0 Comments
[ + ] Show comments
Answers (11)
Please log in to answer
Posted by:
emmy12
16 years ago
Posted by:
sudhi_hebbarms
16 years ago
Hi Emmy,
I am very much new to this packinging. I am not able to understand what do you mean by making the component attribute as shared or permanent. My problem there are two products which have some common xml files being used by both. Both of the products will be installed in the same location and folder. There is file called 'system.xml' which has been overwritten by the products and will use the same file. If i uninstall one of the product then it is removing the system.xml file from the folder location. How to retain that xml file as the same file is being used by the other product which still exists in the same location.
I am very much new to this packinging. I am not able to understand what do you mean by making the component attribute as shared or permanent. My problem there are two products which have some common xml files being used by both. Both of the products will be installed in the same location and folder. There is file called 'system.xml' which has been overwritten by the products and will use the same file. If i uninstall one of the product then it is removing the system.xml file from the folder location. How to retain that xml file as the same file is being used by the other product which still exists in the same location.
Posted by:
AngelD
16 years ago
Should be enuf to have the same exact component info for the component refcount to handle this.
sudhi_hebbarms,
In each package using these xml files you need to make sure the resources which resides in the component holding these files are the same and more vital the GUID of the component (Component table, ComponentId column value) is the same.
When one package is installed the component refcount is increased by one and during removal decreased. So when the last packag with this component is uninstalled the refcount will hit 0 and the component will also be removed, meaning the xml files in that component or any resource for that matter.
sudhi_hebbarms,
In each package using these xml files you need to make sure the resources which resides in the component holding these files are the same and more vital the GUID of the component (Component table, ComponentId column value) is the same.
When one package is installed the component refcount is increased by one and during removal decreased. So when the last packag with this component is uninstalled the refcount will hit 0 and the component will also be removed, meaning the xml files in that component or any resource for that matter.
Posted by:
sudhi_hebbarms
16 years ago
Hi Emmy,
Do you mean to say that Component Guid of 'System.xml' should be same in both the products or a whole product is considered as a component? How can i see the Component Table. Only some of the xml files are common in that product remaining are different and specific to that product. I am newbie to this packaging. Please correct me if i am wrong.
Thanking in advance,
/Sudhi
Do you mean to say that Component Guid of 'System.xml' should be same in both the products or a whole product is considered as a component? How can i see the Component Table. Only some of the xml files are common in that product remaining are different and specific to that product. I am newbie to this packaging. Please correct me if i am wrong.
Thanking in advance,
/Sudhi
Posted by:
emmy12
16 years ago
Hi Sudhi,
What AngelD suggested is the best practice.
lemme explain how to tackle this
Your application consists of features (atleast one) and each feature has several components (MSI Basics)
Now the components may contain one or more resources (files, registry etc...)
Your file (system.xml) should be a part of a component. Each component will have a GUID.
As per AngelD's suggestion... open each of your package and find out the GUID of the components that contains the system.xml file (procedure explained below)
If you find that the component GUID is different (even though they install the same file - system.xml) then edit one of the GUID to match the other.
That solves your problem.
To View Edit Component GUID
----------------------------------
Go to Componet Table and the ComponetID column will contain the GUID.
You can make changes there
What is the Tool that you use to edit your msi (like Orca, Wise Package Studio, Install Shield...) ?
- Emmy
What AngelD suggested is the best practice.
lemme explain how to tackle this
Your application consists of features (atleast one) and each feature has several components (MSI Basics)
Now the components may contain one or more resources (files, registry etc...)
Your file (system.xml) should be a part of a component. Each component will have a GUID.
As per AngelD's suggestion... open each of your package and find out the GUID of the components that contains the system.xml file (procedure explained below)
If you find that the component GUID is different (even though they install the same file - system.xml) then edit one of the GUID to match the other.
That solves your problem.
To View Edit Component GUID
----------------------------------
Go to Componet Table and the ComponetID column will contain the GUID.
You can make changes there
What is the Tool that you use to edit your msi (like Orca, Wise Package Studio, Install Shield...) ?
- Emmy
Posted by:
sudhi_hebbarms
16 years ago
Hi Emmy,
First of all thanks for the suggestion you have provide to take care the commonly shared files. The suggested solution is ok, if we are aware of the files to be commonly shared and make a component(merge module) of it. But here the problem we will not be aware of the commonly shared files as the different product packaging will be happening in different places. Is it possible to check if the filename already exists while installing then log the information or increase the counter. I am using wise package studio 7.0.
Can anyone please suggest how to handle this kind of situation.
/Sudhi
First of all thanks for the suggestion you have provide to take care the commonly shared files. The suggested solution is ok, if we are aware of the files to be commonly shared and make a component(merge module) of it. But here the problem we will not be aware of the commonly shared files as the different product packaging will be happening in different places. Is it possible to check if the filename already exists while installing then log the information or increase the counter. I am using wise package studio 7.0.
Can anyone please suggest how to handle this kind of situation.
/Sudhi
Posted by:
AngelD
16 years ago
Hi Sudhi,
Is it possible to check if the filename already exists while installing then log the information or increase the counter.
So not install the component holding the specific file you need to have the file as keypath for the component.
Then in the Setup Editor view -> Component tab; right-click the component, select details and you should find the option there.
This would be the same as adding the msidbComponentAttributesNeverOverwrite attribute bit to the Attribute column in the Component table for the component. The refcounter will be handled automatically so you don't need to take any action on that.
Is it possible to check if the filename already exists while installing then log the information or increase the counter.
So not install the component holding the specific file you need to have the file as keypath for the component.
Then in the Setup Editor view -> Component tab; right-click the component, select details and you should find the option there.
This would be the same as adding the msidbComponentAttributesNeverOverwrite attribute bit to the Attribute column in the Component table for the component. The refcounter will be handled automatically so you don't need to take any action on that.
Posted by:
sudhi_hebbarms
16 years ago
Hi Emmy,
In my case a Component called Application and contains a,b,c files. I can set key to only one of the file. For example i set key to file 'a'. The component 'Application' in the second product might contains files called x,b,z and there is a chance that one of the file like 'x' can be set as keypath. Since products are packaged in different places, no will be aware of the common files under the Component 'Application'. If i set key path to any of the file under the application folder, will it take care of all the files as key can be set to only one file under the component. Component Application of both products is having different GUID. Is there any mechanism where i can check a file exists then increment / decrement using the script. Can i get a sample code as i am totally new to the script stuff.
/Sudheendra
In my case a Component called Application and contains a,b,c files. I can set key to only one of the file. For example i set key to file 'a'. The component 'Application' in the second product might contains files called x,b,z and there is a chance that one of the file like 'x' can be set as keypath. Since products are packaged in different places, no will be aware of the common files under the Component 'Application'. If i set key path to any of the file under the application folder, will it take care of all the files as key can be set to only one file under the component. Component Application of both products is having different GUID. Is there any mechanism where i can check a file exists then increment / decrement using the script. Can i get a sample code as i am totally new to the script stuff.
/Sudheendra
Posted by:
sudhi_hebbarms
16 years ago
Hi Emmy,
The problem what i am facing if i set filepath key for 'b' out of files a,b,c in Component of Product1 and x,b,z in Component of Product2 and if i install Product1 first then it will install a,b,c files into Application folder. Now i will install product2 and found x and z are not installed in the Application folder. Then how can i overcome this kind of situation. Here only 'b' is the common file which is being used by both the products. When i install both the products then it should show me the files a,b,c,x,z. when i uninstall one of them then i should retain the file 'b'. There can be one more product which contains a,c,y files. So it is hard to predict which are the common files. So when i try to install a product, i am looking for a mechanism where file by file is checked whether exists or not and then log the increment if exists else nothing. In the same while uninstalling decrement from the log. So the uninstall of final product uninstall all the files.
/Sudhi
The problem what i am facing if i set filepath key for 'b' out of files a,b,c in Component of Product1 and x,b,z in Component of Product2 and if i install Product1 first then it will install a,b,c files into Application folder. Now i will install product2 and found x and z are not installed in the Application folder. Then how can i overcome this kind of situation. Here only 'b' is the common file which is being used by both the products. When i install both the products then it should show me the files a,b,c,x,z. when i uninstall one of them then i should retain the file 'b'. There can be one more product which contains a,c,y files. So it is hard to predict which are the common files. So when i try to install a product, i am looking for a mechanism where file by file is checked whether exists or not and then log the increment if exists else nothing. In the same while uninstalling decrement from the log. So the uninstall of final product uninstall all the files.
/Sudhi
Posted by:
emmy12
16 years ago
Posted by:
jmcfadyen
16 years ago
have a read on this to explain AngelD's comments on ref counting.
http://johnmcfadyen.spaces.live.com/blog/cns!9DD01136FC094724!136.entry
http://johnmcfadyen.spaces.live.com/blog/cns!9DD01136FC094724!136.entry
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.