C#.net无法在网络驱动器中运行exe文件

时间:2019-12-18 16:36:01

标签: c# networking

我正在尝试从网络驱动器S运行exe文件: enter image description here 系统找不到路径

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();
        }

    }
}

但是出现了这个奇怪的错误 这适用于本地文件,但不适用于网络驱动器 我应该以其他方法启动

0 个答案:

没有答案