Navigate to C:\test
Open test1.config in Notepad
Search for <test2> After the line that starts <add name="test3"........
insert the following line
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.102.3.2, Culture=neutral, PublicKeyToken=89b483f429c47342" />
Save the test1.config file.
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
This post ought to be in the 'Scripting' forum, no? I expect one of the moderators will move it.

Anyway, this is an XML file, by the look if it? I have an XML WMC which I've used FOR ONE PURPOSE. I emphasise that because I've not used it in about 3 years and therefore can't vouch for the efficacy of the other functions, nor did I spend a great deal of time working out how to use them.. It should be a trivial task to turn the WSC into a class which you can incorporate into the script.

I've deposited a copy http://senduit.com/b805af here. The link expires in 2 days.
Answered 03/04/2008 by: VBScab
Red Belt

Please log in to comment
0
can u pls post that script in this forum, i'm not able to open that site
Answered 03/04/2008 by: skj
Second Degree Brown Belt

Please log in to comment
0
You Should use a deferred CA that reads the xml file, parametrized with public properties, and once read replace the parameters with the valid information.

On Error Resume Next
Dim WshShell, temp_line
Set WshShell = CreateObject("WScript.shell")
sFileName = path to the file to edit
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(sFileName, 1)
temp_line = objFile.ReadAll
temp_line =replace(temp_line , "text to replace", Session.Property("PROPERTY WHERE IS THE VALID TEXT"))
objFile.Close
Set objFile = objFSO.OpenTextFile(sFileName, 2)
objFile.WriteLine temp_line
objFile.Close

If you have more than one parameter you can set a property with all the Public properties to use separated with "|" and with a split command use in the script.
Answered 03/04/2008 by: enzio
Orange Belt

Please log in to comment
0
line should be inserted after the etxt is searched
Answered 03/04/2008 by: skj
Second Degree Brown Belt

Please log in to comment
0
ORIGINAL: skj
can u pls post that script in this forum, i'm not able to open that site
At a whisker under 12K in size, I doubt I'd be popular with the moderators. I can't email it to you, either, as my current client blocks attachments of this type (and yes, it does *sniff* the contents, so the old renaming tricks won't work.) If you have a site I can upload to, I can do that.
Answered 03/04/2008 by: VBScab
Red Belt

Please log in to comment
0
You may paste it into the site if you like, just use the CODE tags so that it will be placed in a text area (the <% icon on the toolbar).
Answered 03/04/2008 by: bkelly
Red Belt

Please log in to comment
0
If your environment allows 3rd-party ActiveX controls, you could do worse than this http://www.chilkatsoft.com/xml-activex.asp

I don't know how you might insert the line in the position you want but the docs look pretty thorough.
Answered 03/04/2008 by: VBScab
Red Belt

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