views:

1514

answers:

8

For my work I need to create a Autorun application for a CD for our client. The problem is all I'm a C# programmer by trade and .NET does not make for the best autoruns since not all computers will have .NET installed on them.

What is a good solution that will work on Win98-Vista computers?

A: 

You can include the runtime with the CD, but you'll have to install it before running your app. You might look into just popping open an html file from the CD.

Otherwise, you can look at writing a small native program that can prompt to install the runtime if it's not there, or run your .NET app if it is.

Eclipse
+2  A: 

There are many small autorun-utils (some free) that are configurable. I would go for one of those.

http://www.ezau.com/latest/articles/083.shtml

Stefan
+6  A: 

The answer to this question is really one of preference. Technically, anything can be instructed to open as an autorun. The autorun.inf file is simply an instruction file that Windows knows how to read in order to determine what it should do when a CD is inserted. That could be an application (written in any language you choose), a powerpoint presentation, opening a link to a website, etc. As long as you follow the rules of the autorun.inf file:

http://autorun.moonvalley.com/autoruninf.htm

Lusid
+2  A: 

You need two things:

Héctor Vergara R.
+2  A: 

It is possible using Mono's bundling feature:

"The resulting executable is self contained and does not need the Mono runtime installed to run."

Mono is an Open Source .Net clone and should be able to run most .Net applications. See "Bundles" section here: http://www.mono-project.com/Guide:Running_Mono_Applications

Alexander Shirshov
A: 

Try Delphi; it's by far the best way to create native win32 application nowadays.

It creates slick stand-alone .exe files with rich GUI's that don't need any runtime libraries or other annoying dependencies. Works on any windows machine.

Wouter van Nifterick
+1  A: 

You could use .hta file on CD to launch as splash page, and from there detect if .NET is installed (using COM from HTA file) and then run your custom executable.

.hta files are what Microsoft SQL Server (and most of their others) installation cd uses from memory, easy to make them look very professional (its just html in the background basically)

RM
A: 

There was a program from Macrovision called "Demoshield" that worked well back in the day. I'm not sure if its available anymore, but it was an alright program for creating the auto-run programs.

Mark Turner