I have an XML file that contains config data that needs to be added to users Application Data folder after a package install. However the xml file that was created has path info (current user) captured from the machine that it was created on and I need the current user path for each user that logs in after I use Active Setup. So in a nutshell the xml file needs the current user logged in's path where it says <current user> below.
Thanks in advance...

Here is the file...

<?xml version="1.0" encoding="utf-8"?>
<SymphonyAddin>
<SymConfigServer>
<ServerName>test.com</ServerName>
<ServerPort>282837</ServerPort>
<Protocol>HTTPS</Protocol>
<NumRetries>1</NumRetries>
<Timeout>3</Timeout>
<SleepTime>3</SleepTime>
</SymConfigServer>
<SymphonyServer>
<ServerName>
</ServerName>
<ServerPort>18288</ServerPort>
<Protocol>https</Protocol>
<TriggerMailAddress>
</TriggerMailAddress>
<TriggerMailInverval>60</TriggerMailInverval>
<ServerVersion>2</ServerVersion>
<CrawlArchiveStatus>120</CrawlArchiveStatus>
<MetaThreadInverval>15</MetaThreadInverval>
<MetaThreadSynInverval>60</MetaThreadSynInverval>
</SymphonyServer>
<OfflineSet>
<Configured>-1</Configured>
<OfflineFilePath>C:\Documents and Settings\<current user></OfflineFilePath>
<RepositoryMaxSize>400</RepositoryMaxSize>
<UpdateInterval>10</UpdateInterval>
<MsgSizeLimit>20</MsgSizeLimit>
<AgeLimit>21</AgeLimit>
<MaxThreads>5</MaxThreads>
<MaxMessages>100</MaxMessages>
<DeleteRule>Age</DeleteRule>
</OfflineSet>
<MessageControl>
<WelcomePage>True</WelcomePage>
<StatusReport>True</StatusReport>
<RestoreWarning>True</RestoreWarning>
</MessageControl>
<Trace>
<TraceFile>C:\Documents and Settings\<current user>\Local Settings\Application Data\IBM\ContentCollector_OutlookExtension\afuOEaddin.trc</TraceFile>
<DebugMapi>False</DebugMapi>
<TraceLevel>TRC</TraceLevel>
<MaxLength>1000</MaxLength>
<MaxNumber>6</MaxNumber>
</Trace>
</SymphonyAddin>
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
What packaging tool are you using?
Answered 05/11/2010 by: SuccessSystems
Senior Yellow Belt

Please log in to comment
0
I'm using vendor supplied silent switches inside a vbscript wrapper.
Answered 05/11/2010 by: dmack
Senior Yellow Belt

Please log in to comment
0
Create a vbscript for your active setup to get the users folder (USERPROFILE Env Var) and then use search and replace to put in the correct path.
Answered 05/11/2010 by: SuccessSystems
Senior Yellow Belt

Please log in to comment
0
Search and replace in an XML file...[shudder]

Use the MSXML object to write the element properly. There's a VBS class knocking about (it may even have been authored by the venerable John McFadyen) which makes using that object much simpler, in that it uses English to describe its functions: the MS naming is somewhat...eccentric, in my view. If you can't find that, I'm pretty sure that the Chilkat (sp?) ActiveX control is now free.
Answered 05/12/2010 by: VBScab
Red Belt

Please log in to comment
0
Thanks for the responses.

So I need to keep this as simple as possible and the client will not go with ActiveX controls installed. Very high security and GPO here. Also I couldnt find anything with MSXML...

I would prefer to do this in my VBScript wrapper or some form of Active Setup to change the element to the current user. Any other ideas?
Answered 05/12/2010 by: dmack
Senior Yellow Belt

Please log in to comment
0
Also I couldnt find anything with MSXML...Really? http://www.lmgtfy.com/?q=mcfadyen+xml+class

Try the first non-sponsored hit.
Answered 05/12/2010 by: VBScab
Red Belt

Please log in to comment
0
Thanks but I can't use MSXML parser in this environment...

What I think I need is to come up with something like a Active Setup vbscript to create the file with the new userprofile path then copy it to the user app folder.
Answered 05/12/2010 by: dmack
Senior Yellow Belt

Please log in to comment
0
Sorry, don't buy that. If the client has even the vaguest sprinkling of MS apps, the parser has to be installed. If it's installed, there can't be any sane argument against using it to do the job in hand. But anyway, I'll give up badgering you.
Answered 05/12/2010 by: VBScab
Red Belt

Please log in to comment
0
Not badgering me at all....I am trying to provide a package for a client that uses a simple solution with vbscript as all the packages here are created that way. To be honest I have no experience working with MSXML and XML DOM so this take time to get this solution in place...thanks anyway
Answered 05/13/2010 by: dmack
Senior Yellow Belt

Please log in to comment
0
Hi dmack,
another approach would be a command line search and replace tool.
We use te.exe for this. http://www.windowsitpro.com/article/tips/jsi-tip-6460-freeware-command-line-text-editor-.aspx
Then you prepare your XML (or any text file) with unique strings, which you are going to replace with custom action calls to te.exe after the files are copied.
Regards, Nick
Answered 05/14/2010 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Please use the CODE tag when posting code or other lengthy text.

Thanks! :)
Answered 05/14/2010 by: VBScab
Red Belt

Please log in to comment
0
Thanks nheim...

I decided to use active setup and a vbscript to find and replace the xml template username strings and then replace it with the WshNetwork.UserName. Works well.

Cheers...
Answered 05/15/2010 by: dmack
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity