using System;
using System.Diagnostics;
using Microsoft.Win32;
namespace ConsoleApp69
{
class Program
{
static void Main(string[] args)
string InstallPath = (string)Registry.GetValue(@"HKEY_CURRENT_USER\Software\Symantec\Symantec Endpoint Protection\SMC\RunOnceSessionPlugin", "FixExtend.exe", null);
string v1 = InstallPath;
string v2 = "14.2";
var version1 = new Version(v1);
var version2 = new Version(v2);
var result = version1.CompareTo(version2);
if (result > 0)
{
Console.WriteLine("Antivirus is up to date");
}
else if (result < 0)
{
// Here is the file path of the new installation
Process.Start(@"S:\Symantec_Endpoint_Protection_14.2.1_MP1_Win64 - bit_Client_EN.exe");
}
else
{
Console.WriteLine("Antivirus version is up to date");
}
Console.WriteLine("Press any key ");
Console.ReadLine();
}
}
}
但是出现了这个奇怪的错误 这适用于本地文件,但不适用于网络驱动器 我应该以其他方法启动