i have app.config file in my application for storing/updating connecting strinng to my database.But when i installed my application on user machine i cannot locate the file to update new database link. How can i find the file on user machine .i.e where the file is installed on hard drive.

How did you installed you app in the user machine? Usually the app config file would be at the root folder of the installation, right beside the app exe.

Anyway, that's not a good distribution concept. If you need to change the DB connection for each client, you should make your app do it.

i publish my application in folder on desktop and copied the folder on flash drive and run the setup exe on user machine.

Are you using ClickOnce or Windows Installer?
If you just publish I think it is always ClickOnce, and you can't configure the path, it'll always install in the users appdata folder.

If you want to have a proper setup, you need to create a windows installer.
Maybe this can help: http://support.microsoft.com/kb/821766

Another option, instead of installing, just compile with release mode and copy the release folder. No install, like a zip.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.