cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XML file updated in Adminstudio

I have an xml file what I need to distribute, but the file has to be updated with the current user name in the file. In Adminstudio 2009 it is possible, but I would like to know how.
The XML file has to add a path to a line. For example, in the xml file I have:

C:\Documents and Settings\username\My Documents\word1.doc


I need to distribute the file by having the username updated with the username who is logged on.
I can use run once/activesetup to run the components where the xml file is located: "StubPath"="msiexec /fup {111111-4A6B-BFB1-DB026FA293A9} /quiet REINSTALL=CURRENTUSER

My problem is to use the XML editor function to update the username. Would some one know how to do it?
thanks in advance.
(3) Replies
I would suggest using [PersonalFolder]word1.doc to set the element content. PersonalFolder is a Windows Installer system folder property that will resolve to the My Documents folder of the current user.

System Folder Properties
http://msdn.microsoft.com/en-us/library/aa370905(v=VS.85).aspx#system_folder_properties

You can take a look at LogonUser and USERNAME properties if you are just interested in the user name:
User Information Properties
http://msdn.microsoft.com/en-us/library/aa370905(v=VS.85).aspx#user_information_properties

Please check the XML File Changes help to see how to set up this view to update the xml file and element that you are looking to do.

-Ajay
using the personal folder does not seem to be an option. The xml file must have the username in it. The xml file does not understand personal folder as the windows installer. I just do not know how to do the xml file update within adminstudio to populate/update the correct username.
Any help would be appreciated.
The reason I suggested using [PersonalFolder] is because during run-time this will be resolved to the actual path to the My Documents folder of the user running the install. And this actual path will be in the XML file after the install is finished (not [PersonalFolder]).

Have you looked at the XML File Changes view help in InstallShield Editor?
XML File Changes View
http://helpnet.flexerasoftware.com/Robo/BIN/Robo.dll?tpc=%2Frobo%2Fprojects%2Finstallshieldlivinghelp%2FISLivingHelpMain2.htm%3FRINoLog28301%3DT&mgr=agm&wnd=InstallShieldLivingHelp%7CMain&agt=wsm&ctxid=

The first step may be to create a brand new sample Basic MSI test project and try to modify the contents of a xml element with a hard-coded path. Once you are able to get this to work, then you can substitute in [PersonalFolder] instead of the hard-coded path. And once you have this working, you can go back to your actual project and implement the same thing there.

Hope this gets you on the right track,
Ajay