CCNet.Common.Helpers.ServiceHelper.GetInstalledServiceBinaryPathName C# (CSharp) Method

GetInstalledServiceBinaryPathName() private static method

Gets binary path name for service with specified service name.
private static GetInstalledServiceBinaryPathName ( string serviceName ) : string
serviceName string
return string
		private static string GetInstalledServiceBinaryPathName(string serviceName)
		{
			Process p = CreateCustomProcess(
				"sc",
				string.Format(
					"qc {0}",
					serviceName));

			p.Start();

			string output = p.StandardOutput.ReadToEnd();

			if (p.ExitCode != 0)
			{
				return null;
			}

			var binaryPathName = ParseServiceBinaryPathName(output);

			return binaryPathName;
		}