Persisting variables for updates or adding additional updateparameter #7486
Unanswered
woscostametaxa
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A scenario would be as follows:
I have a default Update feed location, as well as maybe a second one (or the possibility to use a programmatically given one).
default update feed has (in descending order) bundle2 and bundle1
testing update feed has bundle3 bundle2 bundle1.
What already works is updating as long as I am on the default feed that has been added automatically to the BA at build time -> so using just bundle1, from ARP, I can update fine to bundle2.
When opening ARP from installed bundle2, if I switch the feed, use
Engine.SetUpdateSource
to change the feed and redetect I can find the update. My problem is now when the update starts, it only finds the default feed because it is preselected.I do know I can persist variables, but just for the bundle itself; for updates normally I have automated myself a remember pattern msi bundle to persist all the variables I want to read when running an updated bundle - but is there a best practice on how to inform the bundle to change the feed where it searches for basically itself?
In my example I don't use compressed bundles, so I only download 2mb, and I concat basically the directory where the updatebundle resides with the relative "source" from CacheAcquireBegin (with forward slashes) which works beautifully - if the package can find "itself" on the feed.
The visual studio installer needs to be restarted when switching feeds, so would the best practice be to use a persisted variable, change that, restart, and read the variable bevore detection or is there a more elegant solution?
Could/Should GetRelatedBundleVariable be used for instance?
I have now tried it with a persisted variable - which I initialize on running with empty string - then trying to set it to the currently used Feed if it is not the default one - but when I close the installed BA, after opening it again with ARP, the initial value is reset to empty string again. Am I using the persisted variables in a wrong way? Should I somehow use the rememberpattern to (re)install the Msi containing my variables so the changed variable is persisted?
I know that the VStudio Installer needs a restart when switching the Feed, which I thought could persist the variable, but I am probably using something wrong?
Beta Was this translation helpful? Give feedback.
All reactions