My program retrieves a value a registry key(a path to GTA's folder). I'm using the following code to retrieve it:
private static string PathName
{
get
{
using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey(@"Software\SAMP"))
{
return (string)registryKey.GetValue("gta_sa_exe");
}
}
}
Anyhow, it retrieves it with double backslashes, and I'm trying to replace these by using the following code:
string installdirectory = path.Replace(@"\\", @"\");
System.Diagnostics.Process.Start(installdirectory + " -c -n " + playerinfo[0] + " -h 127.0.0.1 -p 7777");`
but it remains unchanged, can anyone help me out here?