Link to home
Start Free TrialLog in
Avatar of ammad
ammad

asked on

Running Simple Program on Different MAchine

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");
               newkey.SetValue("1","Abc");
     
                   
Directory.CreateDirectory(@"C:\Test");
Console.Read();
          }
     }
}


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).
ASKER CERTIFIED SOLUTION
Avatar of Nebulus_
Nebulus_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.

AW
Avatar of ammad
ammad

ASKER

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