public bool CheckItunes() { string addpath1 = "", addpath2 = ""; if (EnvInfo.GetSystemBits() == 64) { RegistryKey reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Apple Inc.\Apple Mobile Device Support"); if (reg == null) { return(false); } object temp = reg.GetValue("InstallDir"); if (temp == null) { return(false); } addpath1 = temp.ToString(); RegistryKey reg2 = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Apple Inc.\Apple Application Support"); if (reg2 == null) { return(false); } temp = reg2.GetValue("InstallDir"); if (temp == null) { return(false); } addpath2 = temp.ToString(); } else { RegistryKey reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Apple Inc.\Apple Mobile Device Support"); if (reg == null) { return(false); } object temp = reg.GetValue("InstallDir"); if (temp == null) { return(false); } addpath1 = temp.ToString(); RegistryKey reg2 = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Apple Inc.\Apple Application Support"); if (reg2 == null) { return(false); } temp = reg2.GetValue("InstallDir"); if (temp == null) { return(false); } addpath2 = temp.ToString(); } Environment.SetEnvironmentVariable("path", Environment.GetEnvironmentVariable("path") + ";" + addpath1 + ";" + addpath2); return(true); }
private Config() { config = new Hashtable(); string startPath = EnvInfo.GetStartPath(); int OSBits = EnvInfo.GetSystemBits(); if (OSBits == 32) { OSBits = 86; } config.Add("InstExePath", startPath + "\\tools\\DriverInst_x" + OSBits + ".exe"); config.Add("DriverPath", startPath + "\\tools\\driver\\google_x" + OSBits + "_inf\\android_winusb.inf"); config.Add("ADBExePath", startPath + "\\tools\\51adb.exe"); config.Add("AppDirPath", startPath + "\\app\\"); config.Add("Wav", startPath + "\\tools\\wav.wav"); config.Add("HOST", "http://10.2.26.88/"); config.Add("API", "http://10.2.26.88/api/a/type/xml/interface/"); }