Creating an installer for a C# solution

Started by
9 comments, last by Mr Cucumber 20 years, 4 months ago
I''m creating a C# .net program which contains one .exe file and one .dll file. I need to create an installer for this program to let the user install my program from for example a cd. What is it I should do? I really have no idea. I know there is an installer class i .net but the documentation is terrible about how one uses it. Could anyone point out what I need to do?
Advertisement
you could use specific programs like NSIS or InstallShield, NSIS is really great and it''s free too. I don''t know if you have to do special things with C# programs to distribute them.
the .net framework needs to be present, so that''ll need to be checked.
-jonnii=========jon@voodooextreme.comwww.voodooextreme.com
I''ll rephrase my question.
The thing is I''m doing this as a school project and I have to do it in .net. So unfortunately installshield and stuff like that is out of the question.
If you have VS.NET, just add a Setup&Deployment project and add the project output of your dll and exe project to that.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Does your program use the registry at all? If not then I would suggest creating an autorun written in Win32 or something that will check to see if the .NET framework is installed and if it isn''t, run the install program(include it in the CD) and if it already is then run a simple install program you can create that just copies the files to a directory you specify and adds the program to the start menu. If you know the framework is going to be installed on it then you may be able to just make a simple installer and do it that way. BTW-I''m not sure how your supposed to check to see if the framework is installed
I think you can check to see if the .NET framework is installed by checking for the existance of:

HKLM\SOFTWARE\Microsoft\.NETFramework in the registry. Also instead of doing a 2 part install like I suggested you could do the whole installer in C/C++
Why would you write the installer in C/C++ for a .NET-based app when VS can help you make one, and NSIS exists?

Unless you find reasons why NSIS doesn''t work for you I hope people don''t sit down and write their own installers.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Uhh... I haven''t really looked into any other installers. Especially a free one like NSIS. You could just use NSIS like you sugested. The reason for an unmanaged one would be in case they don''t have the framework installed to bootstrap it, plus he said it was only two files needing to be copied. NSIS could serve this purpose apparently. NSIS looks interesting, thanks for the URL. You would probably have to change some sort of script to get it to install the framework but I''m sure that could be done easily.
That seems to be exactly what I need. I hadnt even noticed those projects existed.
Thanks all!

This topic is closed to new replies.

Advertisement