PDA

View Full Version : rewriting a .config file



cdelmonico
12-20-2004, 11:09 AM
I have a vb.net application with a backend DB located in a Data folder and several Crystal reports that are in a report folder. I would like the user to be able to customize where they place the main apps executable, the database and the report folders... so that several users from different workstations can share data and reports. However, the main app uses a config file that has the apps DataPath and ReportPath parameters set inside it. If the user installs these folders aywhere except where the config file points to , the executable cannot initialize. I need to rewrite this config file based on the destinatiion paths the user selects during the install. Any suggestions would be greatly appreciated....

RobertDickau
12-21-2004, 01:36 PM
What format does your config file use? If it's an XML file, you might be able to use the XML File Changes view; or if it's an INI file, you can use the INI File Changes view...

cdelmonico
01-07-2005, 09:52 AM
im havin gtrouble getting started... i cant even figure out which type of installation project is right for me...an i have bought the $175 dollar flimsy paperback manualLearning MSI projects using InstallShield 10.5

1. i have a vb.net application... besides the .exe there are several dll and 1 manifest file, 1 .config file (an xml filetype) and two additional folders 1 for reports and 1 for database. i also need to include the .net framework incase the users machine doesnt have it

2. i would like to have 1 installation rather than 3... that the user can choose whwere to put the main app, and decide where to house the other folders... im thinking that the reports and the db might need to be on a server so several workstations can acces them...

3. maybe i need 2 seperate install so the "common" folders can be installed once and then the main exe can be installed on each individual machine?

4. the .config file holds the paths to the reports folder and also the main DB located inside the data folder... i will need the main app install to rerwite this .config file to point to the right places... i dont know how to store/access or find a path to a folder through the install process... (i understand slightly how to rewrite an xml file if i had a path)

5. you would think for the 1400 bucks we paid for this software it would have some better resources/ documentation ... it seems macrovision "requires" you to purchase training besides....

Christopher Painter
01-07-2005, 10:04 AM
I think you are underestimating what setup development is. It's a true development discipline that requires development skills. Surely the first time you picked up your first development tool you didn't expect the code to just write itself. Surely you also didn't expect Sybase, Borland or Microsoft to come and sit down next to you and show you how to program in their respective languages.

For what you are describing I'd start with a Basic MSI project. This type of project doesn't take that long once you understand what you are doing. If you don't think you'll learn setup development fast enough, perhaps it will be in your interest to just outsource the intitial development of the package and then take over for sustainment.