views:

190

answers:

6

Hello, I've been charged with creating a little GUI launcher app to go on a CD which will offer the user some software and some videos. It's not being aimed at particularly tech-savvy people, so it needs to be quite simple. I guess the real sticking point here is that it will be form based.

I would very much like the launcher to just run from an exe without having to install any .net stuff or have java installed. I know ClickOnce is fairly simple and I will fall back on it if necessary, but I thought it might be worth asking if there are any easy ways to do this.

I mainly program using visual c# these days, but have experience with java and c and I am a relatively quick learner, so feel free to suggest other languages.

+2  A: 

The most straightforward way to create a dependency-free executable for Windows is to use ordinary Win32 functions from C (or C++). Alternatively, you could use MFC with C++ because you can link MFC right into your executable to avoid a dependency on MFC DLLs.

There are probably other C/C++ frameworks that can be linked into an executable. However, you probably want to avoid Java and C# or any other .Net language, if you want minimal dependencies.

Greg Hewgill
A: 

If you write it in Java you could bundle the JRE on the CD and just have a batch file that uses that bundled JRE to launch the app. This should work, but the JRE is kind of large, so you'd need to make sure you'll have enough space on the CD for it.

.Net might be able to do something similar but I've never looked into it at all.

The simplest thing would probably be to just write a simple native app in C/C++ (or in some other language that compiles to a standalone EXE) and use that.

Herms
A: 

Just statically link to the C runtime library and any others you might need (like MFC): /MT or /MTd on the command line and Project Properties > C/C++ > Code Generation > Runtime Libraries in Visual Studio.

Nick Meyer
A: 

Hi,

Now all the windows OS (from win 2003) pre installed with .Net frameworks... so you can go ahead and code in any CLR language...

You are saying ur clienats are not tech ppl, so the chances for uninstalling .net frameworks from their machine is very low..

Cheers

Ramesh Vel

Ramesh Vel
if u downvote, pls respond why....
Ramesh Vel
Although .NET 3.0 was included in Vista, prior to that there is no .NET framework installed by Microsoft in Windows, see http://stackoverflow.com/questions/909516/what-version-of-net-ships-with-what-version-of-windowsEven if you get a new XP laptop with a .NET framework pre-installed, the cause will be the manufacturer's included adware, not Microsoft, so that's not a guarantee. Also I thought your logic was faulty - the fact that the users are not tech savvy doesn't mean that it wont have been uninstalled (by anyone), just that it would be hard for them to install/uninstall anything.
Martin
The XP usage is still around 60%. (source: http://www.w3counter.com/globalstats.php). That is too large a group to ignore.
Johan
A: 

You can use C++ with wxwidgets for GUI and statically link your application

Michał Piaskowski
A: 

Depending on the minimum target OS, you could possibly choose VB6, if it doesn't affend you too much, because the VB6 runtime has been included in windows since Windows 2000. However, you need to stick to the included controls to keep things simple.

Martin