Dynamic Content in Config Files Not Updating
I have seen several other Discussions here regarding "Dynamic Content" and problems updating config files.
All seem to have their own unique issues.
In many cases users are resorting to writing their own Custom Action that does the Dynamic Content Configuration File updates.
While this is definitely something I could do, I am just wondering if there is a known bug in Wise Installation Studio 7 SP1 (7.3.0.250) that is causing this.
Like another user posted a while back, I have had issues where if I only install some features then nothing gets updated in the Config Files and even the Wise Dynamic Content Meta Tags are left in.
If I install All Features (i.e. a Complete Install) then the WiseMeta Tags are removed and the default values of my Properties are added.
This tells me that I have two problems (A) Dynamic Content Replacement is NOT occuring if All Features are NOT installed and (B) the Property Values set by the User during Installation are NOT being used.
Just to fill you in on how I am getting the User's Configuration Values, I tried two approaches:
- User-Friendly Form (Dialog) with Edit Fields tied to their corresponding Properties
- The built-in Custom Property Dialog
When I found my home-grown Dialog wasn't working I figured I would try the built-in version just to see if that is the problem.
I have Verbose Logging turned on and it tells me that it is successfully executing the WiseTextReplacementModify Function both during the "Execute Immediate" and the "Execute Deferred" sequence.
Being new to Software Installation, Windows Installer and Wise Installation Studio, my first inclinations are that either (A) I did something wrong or (B) there is something wrong going on in Wise Installation Studio.
Is there something I am supposed to do to tell my System Configuration Dialog to "save" the values input within the Dialog?
I am not doing that at all.
When I created my home-grown Configuration Dialog I figured this could be the case but I had no idea what to do so I opted to use the "Custom Property Dialog" figuring that one should take care of everything for me.
My Installation installs 10 Web Sites (as Virtual Directories) and 2 Windows Console Applications, all of which have Configuration Files so that is 12 Configuration Files that need to have their Dynamic Properties replaced during Setup.
NOTE: Most of the Configuration Files use much of the same Properties
The Installation includes (configured as Web Application):
10 Features
4,145 Files
281 Folder
12 Configuration Files
The Strucure of my Features are as follows:
Suite [Root]
+Hidden Feature
+Hidden Feature
+Application1
+Application2
+Application3
++Hidden Feature 1 to Application3
++Hidden Feature 2 to Application3
++Hidden Feature 3 to Application3
+++Condition (&Application1=2) OR (!Application1=3)
+Application4
Please Note that I don't really have a full understanding of the Condition Logic but the Condition I put in appeared to make sense (selected for install or already installed).
Is there anything that is jumping out as a possible problem?
Am I just trying to Dynamically Set too many Configuration Files?
Please let me know if anyone has any ideas as to what could be going on and if more information is needed.
Thanks :-)
Comments
Some Properties Dynamically Set
I noticed today that it appears that "system" propertites such as INSTALLDIR are getting set and recorded within my configuration files.
It would seem that the only thing not getting dynamically set are the "custom" properties I have created.
Keep in mind I used the "New Property" feature via the Dynamic Content "Edit" Dialog to create my Properties and I'm using the "Custom Properties" Dialog within my Install to get the values from the user.
Again, I am doing nothing special to "save" these values and assuming that the "Custom Properties" Dialog is doing this for me.
...of course you know what they say about ASSuming :-)
Is there anything I need to physically do to ensure the values for my "custom" properties actually get saved?
Almost There - Working Now For COMPLETE Install Only
I found what my problem was with the Custom Properties and Dynamic Content in regard to updating my Configuration Files.
As I am a newbie to Windows Installer and Wise Installation Studio, I didn't fully realize/understand the differences between different Property Types.
Much like any programming language, Windows Installer has "scope" built in to help deal with properties and who can have access.
All of my Custom Properties were defined in CamelCase (i.e. Mixed case).
According to Windows Installer, that would be seen as a "Private" Property and thus only available to the immediate executing Installer.
Since the Dynamic Content is written using one of Wise's very own Custom Actions, this leaves the isolation of Windows Installer.
Its like using a Private Variable in a Code Module and then trying to access the value from a consuming code module. The only problem here is that Windows Installer will not warn you of this as it is perfectly acceptable to define and use a Private Variable but in my opinion, Wise Installer should have warned me about this at Compile Time.
To resolve this, I went about the extremely time consuming task of globally replacing all MixedCase Property names with UPPERCASE.
Voila, everything works great :-)
Well, except for onet thing.... I still have the same problem others have run into when you do NOT do a Complete Install.
If you do a Typical or Custom install and only select certain Features then NO Dynamic Content gets set and the WISEMETA Tags are left in as Comments within your Configuration Files.
This is frustrating to say the least.
Does anyone have a solution for this?
I have seen this in other posts and the solution the developer comes to is always the same either don't post the solution here or write your own Custom Action /sigh
If anyone has suggestions... maybe I'm missing some magical ingredient... if anyone can help, please let me know.
Thanks!
Try logging the install
Have you tried enabling verbose logging of your install so that you can see precisely what is going on, and which actions (standard and custom) are being executed?
The full installation logic appears in a verbose log and this can help diagnose what is going on.
Perhaps a partial install is not setting the necessary parameters for your dynamic content, or perhaps the conditions on the custom action resolve to false in a partial install.
There are many potential reasons for an install to fail - it then depends on how much time you wish to spend on determining the cause - whether it is indeed an error in your install, or whether it's a bug (the Altiris KB may be worth a search also).
As packagers are frequently under pressure to get the installs completed and out the door, a coded solution to handle dynamic content is often the quickest, if not necessarily the most elegant, workaround.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Log File Contents
I have been using Verbose Logging.
Here is what I see (abbreviated):
Action ended 13:12:31: InstallFiles. Return value 1.
Action 13:12:31: PatchFiles. Patching files...
Action start 13:12:31: PatchFiles.
Action ended 13:12:31: PatchFiles. Return value 0.
Action 13:12:31: WiseTextReplacementInit.
Action start 13:12:31: WiseTextReplacementInit.
Action ended 13:12:31: WiseTextReplacementInit. Return value 1.
Action 13:12:31: WiseTextReplacementModify.
Action start 13:12:31: WiseTextReplacementModify.
WiseTextReplacementModify:
Action ended 13:12:31: WiseTextReplacementModify. Return value 1.
Action 13:12:31: DuplicateFiles. Creating duplicate files...
Action start 13:12:31: DuplicateFiles.
Action ended 13:12:31: DuplicateFiles. Return value 1.
Then later in the log:
Action 13:13:32: WiseTextReplacementModify.
Action 13:13:32: WriteRegistryValues. Writing system registry values...
Based on the first log entries for WiseTextReplacementModify, it appears to have returned a "1".
The second time it shows up in the log, there is just the "Action" and nothing else.
Should I see something there?
NOTE: I compared Complete and Partial Install log files and it is the same.
I haven't changed the Condition in the Installation Script, it is the default:
If NOT REMOVE~="ALL" then
Call DLL From Installation Function WiseTextReplacementInit(WiseTextReplacementInit)
End
No matter the choice on the install, Partial or Complete, the Custom Properties Dialog is still in the same sequence to get the User Input so the values should be there (and they are PUBLIC Properties).
I have one Feature Install Condition so I tried this morning to remove that just to see if it was causing an issue but that had no affect.
Does anything look odd/out of place about my log file? Need more?
Any other suggestions?
EdT, I appreciate your help.
Known Bug in Windows Installer - Dynamic Content
My company got us a Support Contract so I finally got to speak to someone from Wise Support yesterday.
After trying to replicate my issue and succeeding, the support rep I talked to (Alicia) verified that the issues I am experiencing and a host of others who have mentioned such problems here in the forums is indeed a bug in Wise Installation Studio (Wise Installer).
Apparently there is a KB Article and so the Support Rep offered to subscribe me to it but I haven't seen anything yet.
I attempted to find the issue in the KB this morning but had no luck.
I just thought I should post to give a definite answer to this one as I have seen other similar questions about Dynamic Content in other posts here on the forum and never a full answer.
The recommended course of action is to write your own Custom Action to take care of updating your XML Files (Configuration) so that is what I plan to do.
I plan to do this in C# within a WiX Custom Action Project (Microsoft's newest Installer Framework for .NET).
If anyone has experience with that please let me know.
Thanks
Get the KB number
As I mentioned in your other thread on this topic, should you get to speak with Alicia again, ask for the KB number and post it here.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Regarding custom actions in
Regarding custom actions in C#, there is a blog that recommends avoiding custom actions which depend on having the dotnet framework installed, in case they don't work on machines without the necessary framework.
However, recent developments in WIX may offer the ability to do this successfully, so let us know how you get on.
(Previous "best practice" suggested that C++ was a safer option than C# )
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
DTF (Deployment Tools Foundation)
Start by searching for "DTF" and "Managed Custom Actions" or just "Visual Studio c# Custom Action Project"
A starting point would be:
Deployment Tools Foundation (DTF) Managed Custom Actions
http://blog.deploymentengineering.com/2008/05/depl...
Something to read during bedtime:
http://blog.torresdal.net/2008/10/24/WiXAndDTFUsin...
http://community.installshield.com/attachment.php?...
DTF - Thanks
EdT, Thanks, yes I am using DTF from the WiX Project.
...and Thanks AngelD for the Links... I hadn't come across the one with the sample for getting the IIS Web Sites list yet.
Thanks to all and I will post back results and KB Numbers if I can get them.
KB Article
The KB Article for the "Dynamic Content properties not written to XML file" issue is: 35814
https://kb.altiris.com/article.asp?article=35814&p=2
NOTE: This is a secure server and requires a login that is not the same as Symantec Connect
same goes for KB Article: 35814
The same goes for KB Article: 35814 https://kb.altiris.com/article.asp?article=35814&p=1
Any updates on this issue?
I have just come across this issue upgrading from 7.0 to 7.0 SP1. Previously it was fine, but now have the same problems detailed above.
Is there any estimate as to when a resolution for this will be available?
Many thanks
Sadly no.
There is no information as to when any Wise bugs wlll be fixed, or any service releases available.
The Product Marketing guy for Wise is Mike Grueber - he can tell you when anything may be available, if you sign non-disclosure agreements.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Ok, thanks for the
Ok, thanks for the information EdT.
Might see if I can roll the Service Pack off and get back to my previous Wise installation. Wish me luck...
Just uninstall and reinstall
Or install it under SVS so you can have each version running as a virtual app as and when required. I have WIS7 in an SVS layer here at work, so I can have it unloaded when not required.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Would you like to reply?
Login or Register to post your comment.