Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

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).
0
ammad
Asked:
ammad
1 Solution
 
Nebulus_Commented:
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.
0
 
Arthur_WoodCommented:
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
0
 
ammadAuthor Commented:
nice Job My Doubts are clear, Clr is just like Jvm for java class files.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now