博客园站长
这是人类成长进步中记录的每一时刻
try
            {
                //系统盘
                string nl = Environment.NewLine;
                string query = "%SystemRoot%";
                string str = Environment.ExpandEnvironmentVariables(query);
                string str32Path = str + @"\System32\crypto.dll";            var filePath64 = @"key/32dll/crypto.dll";

                //验证系统盘system32与是否有dll,有则跳过,无则复制
               
                if (!File.Exists(str32Path))
                {               
                    File.Copy(filePath32, str32Path);
                }                            return true;
            }
            catch (Exception ex)
            {                
                MessageBox.Show("导入dll到系统盘失败,错误原因为:"+ex.Message);
                return false;
            }

 

posted on 2018-03-19 16:31  dm3344  阅读(290)  评论(0)    收藏  举报