I want to create a window based application in C# so that we can run it without installing the application into each and every system.
It need to connect that application through database as well.
I want to create this application so that it can be run directly through pendrive and can write into database as well.
I know how to work with database though window application but with installer only.
I have created many window application
but all runs on client machine after
Installing the deployed setup. But now
i want client need not install the
setup deployed. He can use my
application by directly clicking my
executable file
There is nothing in Windows that requires an application to be installed. That said, installation is intended to:
Simply avoiding using the registry and saving files locally to your application is usually enough to make your application portable.
That said, as long as you allow the user to select a database location within your software, you should be fine. Saving the information on the pen-drive, in an .ini file for instance, would allow each computer you plug into to read these same settings.
If you expect each computer to have a difference connection string to the database, you could save your settings to the
%appdata%directory. When the user plugs the pendrive back in later, his settings will still be there, and no other user will see these same settings.The downside to the second approach, however, is that the user has no way to “uninstall” and recover the space written to
%appdata%automatically. However, for most private business applications, this isn’t much of a concern.Edit: If your real question here is how to distribute an application without an installer, simply build the Release version of your application, and look in
/bin/Release/within your project. Copy these files to another location, remove any debug or unneeded files, and make sure you have all your dependencies in order.