Not sure how to update a package
Hi everyone,
I modified a package we have deployed last week to fix up files intended for the user's AppData directory. I added some registry keys into HKCU and made these the key paths for the various AppData components. I then created a new feature and moved all the components and registry keys into the new feature.
Anyway, installing the package works fine. However Im now trying to figure out how to deploy it to existing installations. I've tried running a repair using the new package and it does nothing. Can anyone advice how I should do this? Do i need to create an msp?
Thanks.
I modified a package we have deployed last week to fix up files intended for the user's AppData directory. I added some registry keys into HKCU and made these the key paths for the various AppData components. I then created a new feature and moved all the components and registry keys into the new feature.
Anyway, installing the package works fine. However Im now trying to figure out how to deploy it to existing installations. I've tried running a repair using the new package and it does nothing. Can anyone advice how I should do this? Do i need to create an msp?
Thanks.
0 Comments
[ + ] Show comments
Answers (10)
Please log in to answer
Posted by:
anonymous_9363
13 years ago
A repair will only repair the components in the original feature. If you've added things, you'll need to re-install - REINSTALL="ALL" or REINSTALL="(name of feature)". Check out the REINSTALLMODE property, too.
Posted by:
bos302
13 years ago
I've done further research and according to information on msdn, because i'm not only adding a feature, but changing the feature tree by making the 'complete' feature a child of this new feature, it's classified as a 'major upgrade'.
And apparently major upgrades require a complete reinstall as the productcode and productversion are changed. so I've completed this and added the appropriate upgradecode to the upgrade table so it removes the previous product when this MSI is installed. However when the user accesses the application via one of the advertised shortcuts, the self-heal occurs as expected and adds the appropriate HKCU regkeys (which are the keypaths for the various components used for AppData files). The self-heal process then seems to replace all the AppData files. In some cases users have modified these files and I'd prefer they not be replaced.
So a few questions:
- Am I correct in treating this as a major upgrade?
- Should I be putting all these changes into an additional feature or adding them to the existing 'complete' feature? I figure if I use the existing feature a 'major upgrade' won't be necessary.
- Is there anyway to make the package heal and apply the HKCU keys but leave the files alone? Eg. Add the files if they don't exist but don't replace them if they've been modified.
Thanks all.
And apparently major upgrades require a complete reinstall as the productcode and productversion are changed. so I've completed this and added the appropriate upgradecode to the upgrade table so it removes the previous product when this MSI is installed. However when the user accesses the application via one of the advertised shortcuts, the self-heal occurs as expected and adds the appropriate HKCU regkeys (which are the keypaths for the various components used for AppData files). The self-heal process then seems to replace all the AppData files. In some cases users have modified these files and I'd prefer they not be replaced.
So a few questions:
- Am I correct in treating this as a major upgrade?
- Should I be putting all these changes into an additional feature or adding them to the existing 'complete' feature? I figure if I use the existing feature a 'major upgrade' won't be necessary.
- Is there anyway to make the package heal and apply the HKCU keys but leave the files alone? Eg. Add the files if they don't exist but don't replace them if they've been modified.
Thanks all.
Posted by:
PackageExpert
13 years ago
Am I correct in treating this as a major upgrade?
Yes since your adding or changing features.
- Should I be putting all these changes into an additional feature or adding them to the existing 'complete' feature? I figure if I use the existing feature a 'major upgrade' won't be necessary.
There is also Small Update and Minor Upgrade which you may refer below
http://msdn.microsoft.com/en-us/library/aa370037(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367575(VS.85).aspx
- Is there anyway to make the package heal and apply the HKCU keys but leave the files alone? Eg. Add the files if they don't exist but don't replace them if they've been modified.
If u use InstallShield-there is an option Never Overwrite for component you dont have to be replaced if they exist(regardless old or new file)
Alternatively you can use what Ian mentioned, install the files based on the features you need to replace (REINSTALL) property
Yes since your adding or changing features.
- Should I be putting all these changes into an additional feature or adding them to the existing 'complete' feature? I figure if I use the existing feature a 'major upgrade' won't be necessary.
There is also Small Update and Minor Upgrade which you may refer below
http://msdn.microsoft.com/en-us/library/aa370037(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367575(VS.85).aspx
- Is there anyway to make the package heal and apply the HKCU keys but leave the files alone? Eg. Add the files if they don't exist but don't replace them if they've been modified.
If u use InstallShield-there is an option Never Overwrite for component you dont have to be replaced if they exist(regardless old or new file)
Alternatively you can use what Ian mentioned, install the files based on the features you need to replace (REINSTALL) property
Posted by:
bos302
13 years ago
Posted by:
PackageExpert
13 years ago
Posted by:
bos302
13 years ago
Hi,
I apologise, i'm probably not being clear enough. Let me clarify a couple things.
You're correct, at the heart of this issue, all I'm trying to do is add a bunch of regkeys and make them the keypaths for a bunch of components. These components happen to contain files destined for each user's AppData. Now when I read how to handle this, most articles I read advised all the user related components, files, regkeys, etc. should be put into their own feature. I don't understand why, it's just what I was advised, so I did it. So based on this information:
1. Is isolating all the user stuff into a separate feature required or even recommended? If not then I can just modify everything within the existing feature and this won't be considered a major upgrade. I will simply be able to perform a repair using the reinstall and reinstallmode properties.
2. Either way, whether it's a major upgrade or a minor upgrade, I assume the files in the components will be replaced in the user's AppData if they've been detected to have been modified. In that case, you mentioned you can use InstallShield to prevent files being overwritten. I can't find a similar option in Wise. Is this option available in Wise?
Thanks all.
I apologise, i'm probably not being clear enough. Let me clarify a couple things.
You're correct, at the heart of this issue, all I'm trying to do is add a bunch of regkeys and make them the keypaths for a bunch of components. These components happen to contain files destined for each user's AppData. Now when I read how to handle this, most articles I read advised all the user related components, files, regkeys, etc. should be put into their own feature. I don't understand why, it's just what I was advised, so I did it. So based on this information:
1. Is isolating all the user stuff into a separate feature required or even recommended? If not then I can just modify everything within the existing feature and this won't be considered a major upgrade. I will simply be able to perform a repair using the reinstall and reinstallmode properties.
2. Either way, whether it's a major upgrade or a minor upgrade, I assume the files in the components will be replaced in the user's AppData if they've been detected to have been modified. In that case, you mentioned you can use InstallShield to prevent files being overwritten. I can't find a similar option in Wise. Is this option available in Wise?
Thanks all.
Posted by:
naveen.packager
13 years ago
most articles I read advised all the user related components, files, regkeys, etc. should be put into their own feature. I don't understand why, it's just what I was advised, so I did it.
As per my knowledge this is because if any key path is missing in any of the user related component then the whole user related feauture will get self healed and you will get all the user related stuff for the user.
This may not be necessary for small application. Wise puts all the components in only one feauture.
Here are very good threads on self healing http://www.appdeploy.com/messageboards/tm.asp?m=59237
http://itninja.com/question/how-do-you-roll-out-new-machines?4146&mpage=1&key=并
And coming to your problem,
I dont know wether this is a good and correct method, but wanted to give you a hint.
Without creating a new feauture, just add the hkcu key paths for the required user components(I assume you have only one feauture).
And also add a active setup reg key.
Stub path is REINSTALL=ALL and REINSTALLMODE=pusv
(Active setup is because you dont want the files to be rewritten so using active setup will not make the app self heal, I am not sure if this command line works for active setup)
Now install the msi using REINSTALL=ALL and REINSTALLMODE=pusv
Hope this helps, atleast give you a idea[:D]
Posted by:
bos302
13 years ago
Is there another way to handle this besides using active setup? I ask just because the package already has a couple entry points (shortcuts) and I was under the impression you should only use active setup when the package has no entry points.
I'm leaning towards keeping it one feature. That way I can simply repair the package. However there doesn't seem to be anyway to control the self-heal process and prevent it from overwriting files. Is there a property in the package that controls self-heal behaviour? Perhaps the reinstallmode property within the package?
If that's the case and I change the reinstallmode property within the package to 'pusv', would that be problematic?
Or at the end of the day, is active setup the best way to handle this?
Thanks everyone.
P.S. If it was in the active setup, would it run once or everytime the user logs on?
I'm leaning towards keeping it one feature. That way I can simply repair the package. However there doesn't seem to be anyway to control the self-heal process and prevent it from overwriting files. Is there a property in the package that controls self-heal behaviour? Perhaps the reinstallmode property within the package?
If that's the case and I change the reinstallmode property within the package to 'pusv', would that be problematic?
Or at the end of the day, is active setup the best way to handle this?
Thanks everyone.
P.S. If it was in the active setup, would it run once or everytime the user logs on?
Posted by:
naveen.packager
13 years ago
I ask just because the package already has a couple entry points (shortcuts) and I was under the impression you should only use active setup when the package has no entry points.
Ofcourse this is true but there is no harm in using active setup eventhough you have entry points.
Active setup runs only once per user login after installing.
Keeping REINSTALLMODE property within the package did not work for me.
Use the below command lines
In active setup give the command line as msiexec /fpu {Productcode}
Install the application using msiexec /fpumsv "path of new msi"
And check in user if your files are getting replaced which u dont want.
Posted by:
AngelD
13 years ago
Sounds like the easiest solution if the package isn't that big is to perform an upgrade.
Be sure to sequence the RemoveExistingProducts action between the InstallValidate action and the InstallInitialize action if you are "unsure" about the component/feature structure so that the old package will be removed prior to the installation of the new package's resources.
Be sure to sequence the RemoveExistingProducts action between the InstallValidate action and the InstallInitialize action if you are "unsure" about the component/feature structure so that the old package will be removed prior to the installation of the new package's resources.
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.