Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Scripting / July 2006

Tip: Looking for answers? Try searching our database.

Changing a config file at install time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NayJo - 13 Jul 2006 14:40 GMT
Hi,

I'm new to .NET so bear with me and if I'm in the wrong group just let me
know...thank you.

I have a 3rd party .NET 1.1 component that I need to install.  It has an
exe, several dlls and of course a filename.exe.config file.

We are being asked to run regasm.exe on the .config file to register the exe
but the .config file has an element that is unique to each site where we
want to install.

Is there a way I could script the install to modify the .config file before
running regasm?  I'm looking for generalities here.  I'm fairly handy with
VB Script and batch but not to handy with XML (though willing to learn).

Specifically:

If I did the modification in VBScript, what object could I use to modify the
.config file?  Is there an XML object.

Or if I use Windows batch files is there a .NET utility that I could pass
the config file name and the element name and value I want to change - then
run REGASM?

Many thanks in advance.

John C.
Peter Torr (MS) - 13 Jul 2006 15:34 GMT
> If I did the modification in VBScript, what object could I use to modify
> the
> .config file?  Is there an XML object.

Look into MSXML:

http://msdn.microsoft.com/library/en-us/xmlsdk/html/39b17b9c-04c7-4fa8-bcee-1f7d
57eefd74.asp


Peter

Signature

Peter Torr - http://blogs.msdn.com/ptorr
HD DVD Program Manager


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.