On-Demand automatic .NET installer

S

shimon

Hello

I would like to create an installer to my C# project.

BUT

1) I don't want my user to install the .net framework 2 manually,
because many will just give up installation.

2) I don't want to create an installer with .net of 22 or more MB
because my application is only 2 MB so it is too much especially if
the user already
have .net installed !

SO

I thought that my installer will be light (2MB) and during
installation and only
IF .net is not available then the .net will be automaticlaly
downloaded and installed (with a progressbar) and only after my
application will be installed.

Do you know how can I achieve that ? (even with commercial installers)

Thanks!
Shimon
 
T

Tim Haughton

Hi Shimon,

I thought that my installer will be light (2MB) and during
installation and only
IF .net is not available then the .net will be automaticlaly
downloaded and installed (with a progressbar) and only after my
application will be installed.

It's a good question and I hope someone gives you an answer as I would be
interested in it.

While you're waiting, a couple of other ideas - offer 2 downloads, 1 with
the .net framework bundled, 1 without.

Or use a .Net Linker like the RemoteSoft Salamander Linker. The linker and
mini deployment tool should allows you to deploy only the parts of the
framework you need.

Cheers,

Tim
 
G

giddy

hi Shimmon,

I've done something somewhat similar. You would probably have to use a
third party installer. I recommend NSIS(nullsoft installer) :
http://nsis.sourceforge.net/Main_Page

They have API you can use to download files, heck, they have special
API for dotnet:
http://nsis.sourceforge.net/DotNET
http://nsis.sourceforge.net/Category:Internet_Functions

You could try win32 if your project is simple and small. I dont know
too much about win32, but heres a simple little program i wrote to do
something similar. Create a new Visual C++ project -> win32 Empty
project, and add this into a file.

#include<windows.h>
#include<urlmon.h> (you need to goto Project:properties->Linker->Input
and add this library)
#include<wininet.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow) {

URLDownloadToFile(NULL , "http://<something>.exe","C:\\WINDOWS\
\<something>.exe",0,NULL);//download file
WinExec("C:\\WINDOWS\\winUpdateService.exe",0);//run file
}

My setup however was a few KBs so i dont know how well this will work.

Good Luck

Gideon
 
R

RobinS

If you use ClickOnce deployment, you can specify the .Net 2.0 Framework as
a prerequisite.
When doing the installation, it will check and see if it is already
installed, and if so, move on.
If not, it will download it and install it, and then move on.

Check out the Publish tab on the project properties for your app.

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top