Search code examples
vb.netinstallationexe

Making .exe to be run on another computer without installation


Is there any way to make an .exe file run on another computer without installation ? .

The app is quite simple without any resources except one picture.

It has one form, one button and on Form_Load it needs to show picture.

Do I need to make an installation for that ?


Solution

  • No, what you need to do is to first add the picture to the project (on the menu system click Project | Add Existing Item . . .) if you haven't done that yet, and then click on the file in Solution Explorer and set its Build Action in the Properties Window to "Resource." This will ensure the picture is written into the exe file when you build the application, and you won't have to worry about copying it along with the application.

    Select the "Release" build configuration, and then click Build | Rebuild on the menu system to have your application copied to the Bin\Release folder of your project folder. From here you can copy and run it on any computer that has .NET installed.