PasteSite is open to the public, but with limited features. Register to be able to modify access rights, track your pastes and more...
If you prefer reading light text on a dark background to dark text on a light background, then you might want to try the dark theme.
"Untitled" by Anonymous [Plain Text]Description:v Actions: |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("SC2 Base File");
string SC2Base = RegistryValue(@"Wow6432Node\\Blizzard Entertainment\\StarCraft II", "InstallPath") + @"Mods\Liberty.SC2Mod\Base.SC2Data";
Console.WriteLine(SC2Base);
Console.ReadLine();
}
public static string RegistryValue(string folder, string name)
{
RegistryKey OurKey = Registry.LocalMachine;
OurKey = OurKey.OpenSubKey("SOFTWARE", true);
OurKey = OurKey.OpenSubKey(folder, true);
try
{
string theValue = OurKey.GetValue(name).ToString();
return theValue;
}
catch
{
return "Warning!\n\nThe entry '" + name + "' does not exist the the folder: '" + folder + "' !";
}
}
}
}
|