sbornstein2
asked on
How to run a command line console application?
Hello all. I need to run this command line console application on a machine where SSIS business intelligence studio exists but I dont have the C# environment etc. How do I create this and run it on my server? I do have the .Net studio on another machine
using System;
using Microsoft.Win32;
namespace CheckClsidPerm
{
class Program
{
static void Main(string[] args)
{
RegistryKey clsid = Registry.LocalMachine.OpenSubKey(@"Software\Classes\CLSID");
string[] clsids = clsid.GetSubKeyNames();
Console.WriteLine("found {0} keys", clsids.Length);
foreach (string s in clsids)
{
try
{
using(RegistryKey clsidKey = clsid.OpenSubKey(s))
{
using(RegistryKey ic = clsidKey.OpenSubKey("Implemented Categories"))
{
}
}
}
catch( Exception e )
{
Console.WriteLine("error while reading key {0}: {1}", s, e.Message);
}
}
}
}
}
if you have the c# environment on your other machine, you can walk over there.. and create a new console application and copy past the code build it, and copy the project output to your other machine.
You will have to have the .Net framework installed on the server.
Jim
Jim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.