public static void Disconnect()
 {
     try
     {
         IWshRuntimeLibrary.IWshNetwork_Class network = new IWshRuntimeLibrary.IWshNetwork_Class();
         network.RemoveNetworkDrive("i:");
     }
     catch (Exception e)
     {
         CommonUtil.LogWrite(e.Message);
     }
 }
Example #2
0
        public static void Disconnect()
        {
            try
            {
                IWshRuntimeLibrary.IWshNetwork_Class network = new IWshRuntimeLibrary.IWshNetwork_Class();
                network.RemoveNetworkDrive("i:");
            }
#pragma warning disable CS0168 // The variable 'e' is declared but never used
            catch (Exception e)
#pragma warning restore CS0168 // The variable 'e' is declared but never used
            {
            }
        }