Once the runtime and .NET Framework components are installed on a system, most
.NET applications can be deployed by simply copying them onto the host system.
In other words, you could write a simple batch file that copies them from a disk
to your hard drive. Because the runtime and framework components contain the
bulk of the functionality of .NET, the footprints of your applications often
remain small, and an application may fit on a floppy disk. Here is a simple
example of how you might install the .NET application hello.exe you created in
previous article:
- Create a file on a floppy called
install.bat.
- Edit the file and type mkdir c:\MyApp<return>.
- Edit the file and type xcopy hello.exe c:\MyApp\hello.exe<return>.
- Save the file.
- Run install.bat from the floppy disk
(usually a:\install.bat).
That's all there is to it! The application
hello.exe contains all the assembly information it needs to point to the
libraries it needs to use, and all this information is added to hello.exe during
compiletime. Of course, you may consider using a more elaborate setup program
such as InstallShield or Wise Installation to do the copying. That way you can
have fancy bitmaps advertising and explaining your hello.exe program and a
pretty blue layered screen with the title and version of the software plus
security, third-party component installation, and more. However, for many .NET
application installations, xcopy will suffice.