Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Package with Dynamic Dependent file

Status
Not open for further replies.

briancoats

Programmer
May 1, 2003
61
US
Here is the thing. I have a program that Uses a file I create to store customer information for the program. This file will be different for each customer and I would like to build the package in such a was as to not have to rebuild it for each instance of that file. Basically, I need a way to include the file with a setup and have that file copied into the directory with the exe wherever the client decides to install the program. Anyone know how I can accomplish this.

Brian
 
Not sure if this is what you want but depending on what needs to be in this file could you not create a check for the file on program load...If it doesn't exist pop up a form that prompts them for the information you need to create the file. This is also very useful should the user accidently delete the configuration file.
 
good Idea, but I forgot to tell you that this is the file I use for my Copyright protection. Thanks for the input anyway.
 
Are you personalizing the Copyright information text or is this the actual serialization of the program? If its serialization of the program I would suggest using registry rather then a file...Also you could have a single key you generate on your own that you could encrypt and store in the registy, then scan for that key before loading the program to see if anyone has tried to mess with it.

Good Luck
 
In Visual Studio Package and Deployment Wizard, there is the option of including additional files. This will allow you to include the file and install it in the application path (where ever the client choses.)

The trick is in your coding. Instead of using hard coded file locations (i.e. c:\program files\appX\....), use application.path to get your directory.

Something like this

open (application.path & filename) as #1 for input

You'll have to expirement with the code, I haven't done it in a while.
 
I do use the app path thing and all that. The thing is that I would have to repackage for each different file. I think I am just going to have to do it the hard way. Any Other Suggestions would be appreciated.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top