installscript to find and replace an element in xml file
hi all,
I want to edit a config file on the system via my package using the existing functionality within msi's.
i am installing the package on a windows 2008 server machine.
Using any properties\standard tables causes issue as the file i need to edit is C:\Windows\System32\inetsrv\config\applicationHost.config. When the msi is installing this gets overwritten with c:\windows\syswow64. Because of this i cannot use the standard tables. Its really frustrating. I have tried all the predefined folders such as systemfolder\system32folder\ etc. Even if i hardcode the destination it still gets replaced with syswow64.
So, i have turned to installscript and hope to get my hands on a functions that finds and removes an element within an config file. i do have a string find and replace function but this does not work.
here is the element i want to remove <add segment="bin" />
any help would be great!
thx
I want to edit a config file on the system via my package using the existing functionality within msi's.
i am installing the package on a windows 2008 server machine.
Using any properties\standard tables causes issue as the file i need to edit is C:\Windows\System32\inetsrv\config\applicationHost.config. When the msi is installing this gets overwritten with c:\windows\syswow64. Because of this i cannot use the standard tables. Its really frustrating. I have tried all the predefined folders such as systemfolder\system32folder\ etc. Even if i hardcode the destination it still gets replaced with syswow64.
So, i have turned to installscript and hope to get my hands on a functions that finds and removes an element within an config file. i do have a string find and replace function but this does not work.
here is the element i want to remove <add segment="bin" />
any help would be great!
thx
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
If you can switch your allegiance to VBScript (or are able to convert VBS to InstallScript), there are many examples out there which use the MS XML Parser object to create elements, attributes and so on.
BTW, there is a separate 'Scripting' forum on AppDeploy.
BTW, there is a separate 'Scripting' forum on AppDeploy.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.