tags:

views:

358

answers:

7

I am writing an app to discover what features exist on a pc. The user would go to a web page, download the app and execute it (with all the appropriate warnings, this is not spyware). The app would use the standard MS api to determine such things as connection speed, installed memory, firewall health, etc. Writing the app is not a problem, I could use Scripting Host, C#, C++, etc. The question is, if I chose C# is there any guarantee that a certain flavor of windows would have .net installed? The target pc is XP SP2 or better and Vista.

Thanks for the help.

+12  A: 

Vista does have .NET 3.0 installed. XP SP2 doesn't have any .NET framework installed by default.

Mehrdad Afshari
+2  A: 

Mehrdad has it right, SP2 has no .NET installation by default. It's worth noting, however, that you can provide a download for users who lack the runtimes, providing whatever version you are using bundled in. It's an option through the creation wizard of one of the setup packages.

Jeff
A: 

Pre-Vista: there is a significant chance that .NET will not be installed. And event if it is it may be 1.0 or 1.1.

Vista includes .NET 3.0 in RTM, but it is an optional component in Server 2008.

I would also be considered about the size and start up time of .NET. Overall this sounds like something to be written with as few dependencies as possible.

EDIT: Corrected Vista included 3.0 not 3.5.

Richard
Vista does *not* include 3.5. It includes 3.0.
Mehrdad Afshari
Oops, yes you are correct, answer corrected.
Richard
A: 

Like the above have stated, .NET is not installed by default. However if you were using ASP .NET with C#, many things could be gotten just by viewing the website (computer name, domain, userid, etc).

Terry
A: 

Well if you are afraid of use .Net but the client does not have installed, you could try a product which takes all your .Net dependencies and creates an isolated installer that will run on every computer, with all the risks that this could raise to your users (no updates, no bug fixes and such).
Here is the link:
http://www.remotesoft.com/linker/index.html
Hope this helps.

Jaime Febres
+4  A: 

You may want to read Scott Hanselman's blog post SmallestDotNet: On the Size of the .NET Framework, specifically the What's the "Client Profile?" section:

The Client Profile is an even smaller install option for .NET 3.5 SP1 on XP. It's small 277k bootstrapper. When it's run on a Windows XP SP2 machines with no .NET Framework installed, it will download a 28 meg payload and give you a client-specific subset of .NET 3.5. If the Client Profile bootstrapper is run on a machine with any version of .NET on it, it'll act the same as the 3.5 SP1 web installer and detect what it needs to download, then go get it. There's more details in the Client Profile Deployment Guide.

Grant Wagner
A: 

I would suggest avoiding .NET if possible since most versions of Windows come without it and the installer will just add to the pain of using your program. Unless its a large application already... but from the sound of it you can get what you want with a few KB's of C++ executable (i.e. almost instant download).

jheriko
Bah! Nay sayers!
spoulson
Its a great tool but its more hassle for the end user than "nothing". :)
jheriko