Running Simple Program on Different MAchine

Posted on 2003-02-20
Medium Priority
Last Modified: 2010-05-19
TAke a look at this simple program

using System;
using Microsoft.Win32;
using System.IO;
namespace WinRegInVCNET
     class Class1
          static void Main(string[] args)
               RegistryKey key = Registry.LocalMachine.OpenSubKey("Software", true);
               RegistryKey newkey = key.CreateSubKey("YourNAme");

After Compiling this file i got .exe with 6 kb in size that run very well on my system, But when i try to run that .exe (Only Exe)on other machine whcih havent have .net frame work install, gives error message regarding missing resources,Isnt there is any way to deploy(just runnable) such .exe on other operating system like win98 , winxp and all others.( I have win2000 professional).
Question by:ammad
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Nebulus_ earned 75 total points
ID: 7992335
You have no possibility to run an C# program into a system
without .NET framework installed. C# produce just managed exes. But you can add at your solution an installer project in that you can specify to install .NET framework too.
LVL 44

Expert Comment

ID: 7992716
as Nebulus said, the OTHER PC must have the Common Language Runtime (.NET Framework) installed.  This is a FREE download from Microsoft, or you can distribute it along with your EXE.  The .NET Framework will SOON be automatically INCLUDED with all new releases of ALL relevant Microsoft Operating Systems Service packs and upgrades (Windows NT 4 and above) and with ceratin other Microsoft products, such as future Service Packs for SQL Server, so that the download will so NOT be a neccesary additional step.  Also, once the CLR in present, it si sufficient for ALL other .NET applications.


Author Comment

ID: 7995378
nice Job My Doubts are clear, Clr is just like Jvm for java class files.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question