├── BSODInspector ├── obj │ ├── Debug │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── BSODInspector.exe │ │ ├── BSODInspector.pdb │ │ ├── Interop.Shell32.dll │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── BSODInspector.csproj.ResolveComReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── BSODInspector.csprojResolveAssemblyReference.cache │ │ └── BSODInspector.csproj.FileListAbsolute.txt │ ├── Release │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── BSODInspector.exe │ │ ├── BSODInspector.pdb │ │ ├── Interop.Shell32.dll │ │ ├── BSODInspector.csproj.ResolveComReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── BSODInspector.csprojResolveAssemblyReference.cache │ │ ├── ILTemplate.cs │ │ ├── BSODInspector.csproj.FileListAbsolute.txt │ │ └── Common.cs │ ├── x64 │ │ └── Debug │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ ├── BSODInspector.exe │ │ │ ├── BSODInspector.pdb │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── BSODInspector.csprojResolveAssemblyReference.cache │ │ │ └── BSODInspector.csproj.FileListAbsolute.txt │ └── x86 │ │ └── Debug │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── BSODInspector.exe │ │ ├── BSODInspector.pdb │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── BSODInspector.csprojResolveAssemblyReference.cache │ │ └── BSODInspector.csproj.FileListAbsolute.txt ├── FodyWeavers.xml ├── bin │ ├── Debug │ │ ├── BSODInspector.exe │ │ ├── BSODInspector.pdb │ │ ├── Interop.Shell32.dll │ │ ├── BSODInspector.vshost.exe │ │ ├── BSODInspectorMerged.exe │ │ ├── BSODInspectorMerged.pdb │ │ ├── BSODInspector.exe.config │ │ ├── BSODInspector.vshost.exe.config │ │ └── BSODInspector.vshost.exe.manifest │ ├── Release │ │ ├── BSODInspector.exe │ │ ├── BSODInspector.pdb │ │ ├── Interop.Shell32.dll │ │ ├── BSODInspectorMerged.exe │ │ ├── BSODInspectorMerged.pdb │ │ ├── BSODInspector.vshost.exe │ │ ├── .vs │ │ │ └── BSODInspector │ │ │ │ └── v14 │ │ │ │ └── .suo │ │ ├── BSODInspector.exe.config │ │ ├── BSODInspector.vshost.exe.config │ │ └── BSODInspector.vshost.exe.manifest │ ├── x64 │ │ └── Debug │ │ │ ├── BSODInspector.exe │ │ │ ├── BSODInspector.pdb │ │ │ ├── BSODInspector.vshost.exe │ │ │ ├── BSODInspector.exe.config │ │ │ ├── BSODInspector.vshost.exe.config │ │ │ └── BSODInspector.vshost.exe.manifest │ └── x86 │ │ └── Debug │ │ ├── BSODInspector.exe │ │ ├── BSODInspector.pdb │ │ ├── BSODInspector.vshost.exe │ │ ├── BSODInspector.exe.config │ │ ├── BSODInspector.vshost.exe.config │ │ └── BSODInspector.vshost.exe.manifest ├── App.config ├── packages.config ├── BSODInspector.csproj.user ├── Properties │ └── AssemblyInfo.cs ├── app.manifest ├── BSODInspector.csproj └── Program.cs ├── BSODInspector.v12.suo ├── packages ├── ILMerge.2.14.1208 │ ├── tools │ │ ├── ILMerge.doc │ │ └── ILMerge.exe │ └── ILMerge.2.14.1208.nupkg └── ILRepack.2.0.8 │ ├── ILRepack.2.0.8.nupkg │ └── tools │ └── ILRepack.exe └── BSODInspector.sln /BSODInspector/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BSODInspector.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector.v12.suo -------------------------------------------------------------------------------- /BSODInspector/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Debug/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Debug/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/Interop.Shell32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Debug/Interop.Shell32.dll -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/Interop.Shell32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/Interop.Shell32.dll -------------------------------------------------------------------------------- /BSODInspector/obj/Release/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Release/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/obj/Release/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Release/BSODInspector.pdb -------------------------------------------------------------------------------- /packages/ILMerge.2.14.1208/tools/ILMerge.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/packages/ILMerge.2.14.1208/tools/ILMerge.doc -------------------------------------------------------------------------------- /packages/ILMerge.2.14.1208/tools/ILMerge.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/packages/ILMerge.2.14.1208/tools/ILMerge.exe -------------------------------------------------------------------------------- /packages/ILRepack.2.0.8/ILRepack.2.0.8.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/packages/ILRepack.2.0.8/ILRepack.2.0.8.nupkg -------------------------------------------------------------------------------- /packages/ILRepack.2.0.8/tools/ILRepack.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/packages/ILRepack.2.0.8/tools/ILRepack.exe -------------------------------------------------------------------------------- /BSODInspector/bin/Release/Interop.Shell32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/Interop.Shell32.dll -------------------------------------------------------------------------------- /BSODInspector/bin/x64/Debug/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/x64/Debug/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/bin/x64/Debug/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/x64/Debug/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/bin/x86/Debug/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/x86/Debug/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/bin/x86/Debug/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/x86/Debug/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/obj/Release/Interop.Shell32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Release/Interop.Shell32.dll -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x64/Debug/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x64/Debug/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/BSODInspector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x86/Debug/BSODInspector.exe -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/BSODInspector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x86/Debug/BSODInspector.pdb -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspector.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Debug/BSODInspector.vshost.exe -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspectorMerged.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Debug/BSODInspectorMerged.exe -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspectorMerged.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Debug/BSODInspectorMerged.pdb -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspectorMerged.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/BSODInspectorMerged.exe -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspectorMerged.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/BSODInspectorMerged.pdb -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspector.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/BSODInspector.vshost.exe -------------------------------------------------------------------------------- /packages/ILMerge.2.14.1208/ILMerge.2.14.1208.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/packages/ILMerge.2.14.1208/ILMerge.2.14.1208.nupkg -------------------------------------------------------------------------------- /BSODInspector/bin/Release/.vs/BSODInspector/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/Release/.vs/BSODInspector/v14/.suo -------------------------------------------------------------------------------- /BSODInspector/bin/x64/Debug/BSODInspector.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/x64/Debug/BSODInspector.vshost.exe -------------------------------------------------------------------------------- /BSODInspector/bin/x86/Debug/BSODInspector.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/bin/x86/Debug/BSODInspector.vshost.exe -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /BSODInspector/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/BSODInspector.csproj.ResolveComReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/BSODInspector.csproj.ResolveComReference.cache -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/BSODInspector.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Debug/BSODInspector.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /BSODInspector/obj/Release/BSODInspector.csproj.ResolveComReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Release/BSODInspector.csproj.ResolveComReference.cache -------------------------------------------------------------------------------- /BSODInspector/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /BSODInspector/obj/Release/BSODInspector.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/Release/BSODInspector.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/BSODInspector.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x64/Debug/BSODInspector.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/BSODInspector.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueelvis/BSOD-Inspector/HEAD/BSODInspector/obj/x86/Debug/BSODInspector.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspector.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspector.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspector.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspector.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BSODInspector/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /BSODInspector/bin/x64/Debug/BSODInspector.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BSODInspector/bin/x86/Debug/BSODInspector.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BSODInspector/bin/x64/Debug/BSODInspector.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BSODInspector/bin/x86/Debug/BSODInspector.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BSODInspector/BSODInspector.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | -------------------------------------------------------------------------------- /BSODInspector/obj/x64/Debug/BSODInspector.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\x64\Debug\BSODInspector.exe.config 2 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\x64\Debug\BSODInspector.exe 3 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\x64\Debug\BSODInspector.pdb 4 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\obj\x64\Debug\BSODInspector.csprojResolveAssemblyReference.cache 5 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\obj\x64\Debug\BSODInspector.exe 6 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\obj\x64\Debug\BSODInspector.pdb 7 | -------------------------------------------------------------------------------- /BSODInspector/obj/x86/Debug/BSODInspector.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\bin\x86\Debug\BSODInspector.exe.config 2 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\bin\x86\Debug\BSODInspector.exe 3 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\bin\x86\Debug\BSODInspector.pdb 4 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\obj\x86\Debug\BSODInspector.csprojResolveAssemblyReference.cache 5 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\obj\x86\Debug\BSODInspector.exe 6 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\obj\x86\Debug\BSODInspector.pdb 7 | -------------------------------------------------------------------------------- /BSODInspector/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("BSODInspector")] 8 | [assembly: AssemblyDescription("A utility to collect diagnostic information for helping diagnosing Blue Screen Of Death Errors")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("omgdebugging.com")] 11 | [assembly: AssemblyProduct("BSODInspector (omgdebugging.com)")] 12 | [assembly: AssemblyCopyright("Copyright © 2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("c733b7dc-dda7-4535-8222-140a02266897")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.4.0")] 35 | [assembly: AssemblyFileVersion("1.0.4.0")] 36 | -------------------------------------------------------------------------------- /BSODInspector/obj/Release/ILTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | static class ILTemplate 6 | { 7 | static readonly Dictionary nullCache = new Dictionary(); 8 | 9 | static readonly Dictionary assemblyNames = new Dictionary(); 10 | static readonly Dictionary symbolNames = new Dictionary(); 11 | 12 | public static void Attach() 13 | { 14 | var currentDomain = AppDomain.CurrentDomain; 15 | currentDomain.AssemblyResolve += (s, e) => ResolveAssembly(e.Name); 16 | } 17 | 18 | public static Assembly ResolveAssembly(string assemblyName) 19 | { 20 | if (nullCache.ContainsKey(assemblyName)) 21 | { 22 | return null; 23 | } 24 | 25 | var requestedAssemblyName = new AssemblyName(assemblyName); 26 | 27 | var assembly = Common.ReadExistingAssembly(requestedAssemblyName); 28 | if (assembly != null) 29 | { 30 | return assembly; 31 | } 32 | 33 | Common.Log("Loading assembly '{0}' into the AppDomain", requestedAssemblyName); 34 | 35 | assembly = Common.ReadFromEmbeddedResources(assemblyNames, symbolNames, requestedAssemblyName); 36 | if (assembly == null) 37 | { 38 | nullCache.Add(assemblyName, true); 39 | 40 | // Handles retargeted assemblies like PCL 41 | if (requestedAssemblyName.Flags == AssemblyNameFlags.Retargetable) 42 | { 43 | assembly = Assembly.Load(requestedAssemblyName); 44 | } 45 | } 46 | return assembly; 47 | } 48 | } -------------------------------------------------------------------------------- /BSODInspector.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BSODInspector", "BSODInspector\BSODInspector.csproj", "{C90681CA-360C-44D6-80FC-9FA942927A5B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Debug|x64.ActiveCfg = Debug|x64 21 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Debug|x64.Build.0 = Debug|x64 22 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Debug|x86.ActiveCfg = Debug|x86 23 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Debug|x86.Build.0 = Debug|x86 24 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Release|x64.ActiveCfg = Release|x64 27 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Release|x64.Build.0 = Release|x64 28 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Release|x86.ActiveCfg = Release|x86 29 | {C90681CA-360C-44D6-80FC-9FA942927A5B}.Release|x86.Build.0 = Release|x86 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /BSODInspector/obj/Debug/BSODInspector.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | c:\users\blueelvis_roxxx\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\Debug\BSODInspector.exe.config 2 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\bin\Debug\BSODInspector.exe 3 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\bin\Debug\BSODInspector.pdb 4 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.csprojResolveAssemblyReference.cache 5 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.exe 6 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2013\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.pdb 7 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Debug\BSODInspector.exe.config 8 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Debug\BSODInspector.exe 9 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Debug\BSODInspector.pdb 10 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.csprojResolveAssemblyReference.cache 11 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.exe 12 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.pdb 13 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Debug\Interop.Shell32.dll 14 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Debug\BSODInspector.csproj.ResolveComReference.cache 15 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Debug\Interop.Shell32.dll 16 | -------------------------------------------------------------------------------- /BSODInspector/obj/Release/BSODInspector.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\Release\BSODInspector.exe.config 2 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\Release\BSODInspector.exe 3 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\bin\Release\BSODInspector.pdb 4 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.csprojResolveAssemblyReference.cache 5 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.exe 6 | C:\Users\Blueelvis_RoXXX\documents\visual studio 2013\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.pdb 7 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Release\BSODInspector.exe.config 8 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.exe 9 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.pdb 10 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Release\BSODInspector.exe 11 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Release\BSODInspector.pdb 12 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.csprojResolveAssemblyReference.cache 13 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\bin\Release\Interop.Shell32.dll 14 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Release\Interop.Shell32.dll 15 | C:\Users\Blueelvis_RoXXX\Documents\Visual Studio 2015\Projects\BSODInspector\BSODInspector\obj\Release\BSODInspector.csproj.ResolveComReference.cache 16 | -------------------------------------------------------------------------------- /BSODInspector/bin/x64/Debug/BSODInspector.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /BSODInspector/bin/x86/Debug/BSODInspector.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /BSODInspector/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 54 | -------------------------------------------------------------------------------- /BSODInspector/bin/Debug/BSODInspector.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 54 | -------------------------------------------------------------------------------- /BSODInspector/bin/Release/BSODInspector.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 54 | -------------------------------------------------------------------------------- /BSODInspector/BSODInspector.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C90681CA-360C-44D6-80FC-9FA942927A5B} 8 | Exe 9 | Properties 10 | BSODInspector 11 | BSODInspector 12 | v3.5 13 | 512 14 | false 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 1 26 | 1.0.0.%2a 27 | false 28 | true 29 | true 30 | 31 | 32 | 33 | 34 | 35 | 36 | AnyCPU 37 | true 38 | full 39 | false 40 | bin\Debug\ 41 | DEBUG;TRACE 42 | prompt 43 | 4 44 | 45 | 46 | AnyCPU 47 | pdbonly 48 | true 49 | bin\Release\ 50 | TRACE 51 | prompt 52 | 4 53 | 54 | 55 | app.manifest 56 | 57 | 58 | x64 59 | bin\x64\Debug\ 60 | 61 | 62 | x64 63 | bin\x64\Release\ 64 | 65 | 66 | x86 67 | bin\x86\Debug\ 68 | 69 | 70 | x86 71 | bin\x86\Release\ 72 | 73 | 74 | 40FB14C2C14CEF4B526B1A8201240A491D5DC3F0 75 | 76 | 77 | BSODInspector_TemporaryKey.pfx 78 | 79 | 80 | false 81 | 82 | 83 | LocalIntranet 84 | 85 | 86 | true 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Designer 107 | 108 | 109 | 110 | 111 | 112 | 113 | False 114 | Microsoft .NET Framework 4.5 %28x86 and x64%29 115 | true 116 | 117 | 118 | False 119 | .NET Framework 3.5 SP1 Client Profile 120 | false 121 | 122 | 123 | False 124 | .NET Framework 3.5 SP1 125 | false 126 | 127 | 128 | 129 | 130 | {50A7E9B0-70EF-11D1-B75A-00A0C90564FE} 131 | 1 132 | 0 133 | 0 134 | tlbimp 135 | False 136 | True 137 | 138 | 139 | 140 | 141 | 142 | 143 | 150 | -------------------------------------------------------------------------------- /BSODInspector/obj/Release/Common.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Globalization; 5 | using System.IO; 6 | using System.IO.Compression; 7 | using System.Reflection; 8 | using System.Runtime.InteropServices; 9 | using System.Security.AccessControl; 10 | using System.Security.Cryptography; 11 | using System.Security.Principal; 12 | using System.Text; 13 | using System.Threading; 14 | 15 | static class Common 16 | { 17 | private const int DelayUntilReboot = 4; 18 | 19 | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 20 | static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags); 21 | 22 | [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] 23 | static extern IntPtr LoadLibrary(string dllToLoad); 24 | 25 | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 26 | [return: MarshalAs(UnmanagedType.Bool)] 27 | static extern bool SetDllDirectory(string lpPathName); 28 | 29 | [Conditional("DEBUG")] 30 | public static void Log(string format, params object[] args) 31 | { 32 | // Should this be trace? 33 | Debug.WriteLine("=== COSTURA === " + string.Format(format, args)); 34 | } 35 | 36 | static void CopyTo(Stream source, Stream destination) 37 | { 38 | var array = new byte[81920]; 39 | int count; 40 | while ((count = source.Read(array, 0, array.Length)) != 0) 41 | { 42 | destination.Write(array, 0, count); 43 | } 44 | } 45 | 46 | static void CreateDirectory(string tempBasePath) 47 | { 48 | if (!Directory.Exists(tempBasePath)) 49 | { 50 | Directory.CreateDirectory(tempBasePath); 51 | } 52 | } 53 | 54 | static byte[] ReadStream(Stream stream) 55 | { 56 | var data = new Byte[stream.Length]; 57 | stream.Read(data, 0, data.Length); 58 | return data; 59 | } 60 | 61 | public static string CalculateChecksum(string filename) 62 | { 63 | using (var fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) 64 | using (var bs = new BufferedStream(fs)) 65 | using (var sha1 = new SHA1Managed()) 66 | { 67 | var hash = sha1.ComputeHash(bs); 68 | var formatted = new StringBuilder(2*hash.Length); 69 | foreach (var b in hash) 70 | { 71 | formatted.AppendFormat("{0:X2}", b); 72 | } 73 | return formatted.ToString(); 74 | } 75 | } 76 | 77 | public static Assembly ReadExistingAssembly(AssemblyName name) 78 | { 79 | var currentDomain = AppDomain.CurrentDomain; 80 | var assemblies = currentDomain.GetAssemblies(); 81 | foreach (var assembly in assemblies) 82 | { 83 | var currentName = assembly.GetName(); 84 | if (string.Equals(currentName.Name, name.Name, StringComparison.InvariantCultureIgnoreCase) && 85 | string.Equals(CultureToString(currentName.CultureInfo), CultureToString(name.CultureInfo), StringComparison.InvariantCultureIgnoreCase)) 86 | { 87 | Log("Assembly '{0}' already loaded, returning existing assembly", assembly.FullName); 88 | 89 | return assembly; 90 | } 91 | } 92 | return null; 93 | } 94 | 95 | static string CultureToString(CultureInfo culture) 96 | { 97 | if (culture == null) 98 | return ""; 99 | 100 | return culture.Name; 101 | } 102 | 103 | public static Assembly ReadFromDiskCache(string tempBasePath, AssemblyName requestedAssemblyName) 104 | { 105 | var name = requestedAssemblyName.Name.ToLowerInvariant(); 106 | 107 | if (requestedAssemblyName.CultureInfo != null && !String.IsNullOrEmpty(requestedAssemblyName.CultureInfo.Name)) 108 | name = String.Format("{0}.{1}", requestedAssemblyName.CultureInfo.Name, name); 109 | 110 | var bittyness = IntPtr.Size == 8 ? "64" : "32"; 111 | var assemblyTempFilePath = Path.Combine(tempBasePath, String.Concat(name, ".dll")); 112 | if (File.Exists(assemblyTempFilePath)) 113 | { 114 | return Assembly.LoadFile(assemblyTempFilePath); 115 | } 116 | assemblyTempFilePath = Path.ChangeExtension(assemblyTempFilePath, "exe"); 117 | if (File.Exists(assemblyTempFilePath)) 118 | { 119 | return Assembly.LoadFile(assemblyTempFilePath); 120 | } 121 | assemblyTempFilePath = Path.Combine(Path.Combine(tempBasePath, bittyness), String.Concat(name, ".dll")); 122 | if (File.Exists(assemblyTempFilePath)) 123 | { 124 | return Assembly.LoadFile(assemblyTempFilePath); 125 | } 126 | assemblyTempFilePath = Path.ChangeExtension(assemblyTempFilePath, "exe"); 127 | if (File.Exists(assemblyTempFilePath)) 128 | { 129 | return Assembly.LoadFile(assemblyTempFilePath); 130 | } 131 | return null; 132 | } 133 | 134 | public static Assembly ReadFromEmbeddedResources(Dictionary assemblyNames, Dictionary symbolNames, AssemblyName requestedAssemblyName) 135 | { 136 | var name = requestedAssemblyName.Name.ToLowerInvariant(); 137 | 138 | if (requestedAssemblyName.CultureInfo != null && !String.IsNullOrEmpty(requestedAssemblyName.CultureInfo.Name)) 139 | name = String.Format("{0}.{1}", requestedAssemblyName.CultureInfo.Name, name); 140 | 141 | byte[] assemblyData; 142 | using (var assemblyStream = LoadStream(assemblyNames, name)) 143 | { 144 | if (assemblyStream == null) 145 | { 146 | return null; 147 | } 148 | assemblyData = ReadStream(assemblyStream); 149 | } 150 | 151 | using (var pdbStream = LoadStream(symbolNames, name)) 152 | { 153 | if (pdbStream != null) 154 | { 155 | var pdbData = ReadStream(pdbStream); 156 | return Assembly.Load(assemblyData, pdbData); 157 | } 158 | } 159 | 160 | return Assembly.Load(assemblyData); 161 | } 162 | 163 | static Stream LoadStream(Dictionary resourceNames, string name) 164 | { 165 | string value; 166 | if (resourceNames.TryGetValue(name, out value)) 167 | return LoadStream(value); 168 | 169 | return null; 170 | } 171 | 172 | static Stream LoadStream(string fullname) 173 | { 174 | var executingAssembly = Assembly.GetExecutingAssembly(); 175 | 176 | if (fullname.EndsWith(".zip")) 177 | { 178 | using (var stream = executingAssembly.GetManifestResourceStream(fullname)) 179 | using (var compressStream = new DeflateStream(stream, CompressionMode.Decompress)) 180 | { 181 | var memStream = new MemoryStream(); 182 | CopyTo(compressStream, memStream); 183 | memStream.Position = 0; 184 | return memStream; 185 | } 186 | } 187 | 188 | return executingAssembly.GetManifestResourceStream(fullname); 189 | } 190 | 191 | // Mutex code from http://stackoverflow.com/questions/229565/what-is-a-good-pattern-for-using-a-global-mutex-in-c 192 | public static void PreloadUnmanagedLibraries(string hash, string tempBasePath, IEnumerable libs, Dictionary checksums) 193 | { 194 | var mutexId = string.Format("Global\\Costura{0}", hash); 195 | 196 | using (var mutex = new Mutex(false, mutexId)) 197 | { 198 | var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow); 199 | var securitySettings = new MutexSecurity(); 200 | securitySettings.AddAccessRule(allowEveryoneRule); 201 | mutex.SetAccessControl(securitySettings); 202 | 203 | var hasHandle = false; 204 | try 205 | { 206 | try 207 | { 208 | hasHandle = mutex.WaitOne(60000, false); 209 | if (hasHandle == false) 210 | throw new TimeoutException("Timeout waiting for exclusive access"); 211 | } 212 | catch (AbandonedMutexException) 213 | { 214 | hasHandle = true; 215 | } 216 | 217 | var bittyness = IntPtr.Size == 8 ? "64" : "32"; 218 | CreateDirectory(Path.Combine(tempBasePath, bittyness)); 219 | InternalPreloadUnmanagedLibraries(tempBasePath, libs, checksums); 220 | } 221 | finally 222 | { 223 | if (hasHandle) 224 | mutex.ReleaseMutex(); 225 | } 226 | } 227 | } 228 | 229 | static void InternalPreloadUnmanagedLibraries(string tempBasePath, IEnumerable libs, Dictionary checksums) 230 | { 231 | string name; 232 | 233 | foreach (var lib in libs) 234 | { 235 | name = ResourceNameToPath(lib); 236 | 237 | var assemblyTempFilePath = Path.Combine(tempBasePath, name); 238 | 239 | if (File.Exists(assemblyTempFilePath)) 240 | { 241 | var checksum = CalculateChecksum(assemblyTempFilePath); 242 | if (checksum != checksums[lib]) 243 | File.Delete(assemblyTempFilePath); 244 | } 245 | 246 | if (!File.Exists(assemblyTempFilePath)) 247 | { 248 | using (var copyStream = LoadStream(lib)) 249 | using (var assemblyTempFile = File.OpenWrite(assemblyTempFilePath)) 250 | { 251 | CopyTo(copyStream, assemblyTempFile); 252 | } 253 | if (!MoveFileEx(assemblyTempFilePath, null, DelayUntilReboot)) 254 | { 255 | //TODO: for now we ignore the return value. 256 | } 257 | } 258 | } 259 | 260 | SetDllDirectory(tempBasePath); 261 | 262 | foreach (var lib in libs) 263 | { 264 | name = ResourceNameToPath(lib); 265 | 266 | if (name.EndsWith(".dll")) 267 | { 268 | var assemblyTempFilePath = Path.Combine(tempBasePath, name); 269 | 270 | LoadLibrary(assemblyTempFilePath); 271 | } 272 | } 273 | } 274 | 275 | static string ResourceNameToPath(string lib) 276 | { 277 | var bittyness = IntPtr.Size == 8 ? "64" : "32"; 278 | 279 | var name = lib; 280 | 281 | if (lib.StartsWith(String.Concat("costura", bittyness, "."))) 282 | { 283 | name = Path.Combine(bittyness, lib.Substring(10)); 284 | } 285 | else if (lib.StartsWith("costura.")) 286 | { 287 | name = lib.Substring(8); 288 | } 289 | 290 | if (name.EndsWith(".zip")) 291 | { 292 | name = name.Substring(0, name.Length - 4); 293 | } 294 | 295 | return name; 296 | } 297 | } -------------------------------------------------------------------------------- /BSODInspector/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using Microsoft.VisualBasic.Devices; 5 | using Microsoft.Win32; 6 | using System.Management; 7 | using System.Net; 8 | using System.Security.AccessControl; 9 | using System.Security.Principal; 10 | using System.Threading; 11 | using System.Runtime.InteropServices; 12 | 13 | namespace BSODInspector 14 | { 15 | internal class Program 16 | { 17 | //## Methods for Flashing the Taskbar window of the inactive process 18 | [DllImport("user32.dll")] 19 | private static extern bool FlashWindow(IntPtr hwnd, bool bInvert); 20 | //## END 21 | 22 | 23 | /// 24 | /// Main Program 25 | /// 26 | private static void Main() 27 | { 28 | Console.WriteLine("####################################"); 29 | Console.WriteLine("BSOD Inspector"); 30 | Console.WriteLine("####################################"); 31 | Console.WriteLine(Environment.NewLine + "Created By - blueelvis"); 32 | Console.WriteLine("Special Thanks - John D. Carrona (Microsoft MVP)" + Environment.NewLine + 33 | Environment.NewLine); 34 | string zipFileName = Environment.MachineName + "_" + DateTime.Now.ToString("G") + ".zip"; 35 | zipFileName = 36 | zipFileName.Replace(" ", "_") 37 | .Replace("\\", "_") 38 | .Replace(":", "_") 39 | .Replace("-", "_") 40 | .Replace("/", "_"); // Example = DESKTOP_1ITND9M_14_11_2015_23_31_35.zip 41 | string tempDirectory = Path.GetTempPath() + @"blueelvis"; 42 | string systemDrive = Path.GetPathRoot(Environment.SystemDirectory); 43 | string applicationVersion = "1.0.4"; 44 | bool is64BitOperatingSystem=false; 45 | ComputerInfo sysinfo = new ComputerInfo(); //References Microsoft.VisualBasic.Devices 46 | 47 | 48 | if (Directory.Exists(tempDirectory)) //Check for Directory and access rights 49 | { 50 | DirectoryInfo dInfo = new DirectoryInfo(tempDirectory); 51 | DirectorySecurity dSecurity = dInfo.GetAccessControl(); 52 | dSecurity.AddAccessRule(new FileSystemAccessRule( 53 | new SecurityIdentifier(WellKnownSidType.WorldSid, null), FileSystemRights.FullControl, 54 | InheritanceFlags.ObjectInherit | InheritanceFlags.ContainerInherit, 55 | PropagationFlags.NoPropagateInherit, AccessControlType.Allow)); 56 | dInfo.SetAccessControl(dSecurity); 57 | foreach (var existingFiles in Directory.GetFiles(tempDirectory)) 58 | File.Delete(existingFiles); 59 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Deleted Existing Temporary Files\n\n"); 60 | } 61 | else 62 | { 63 | Directory.CreateDirectory(tempDirectory); 64 | DirectoryInfo dInfo = new DirectoryInfo(tempDirectory); 65 | DirectorySecurity dSecurity = dInfo.GetAccessControl(); 66 | dSecurity.AddAccessRule(new FileSystemAccessRule( 67 | new SecurityIdentifier(WellKnownSidType.WorldSid, null), FileSystemRights.FullControl, 68 | InheritanceFlags.ObjectInherit | InheritanceFlags.ContainerInherit, 69 | PropagationFlags.NoPropagateInherit, AccessControlType.Allow)); 70 | dInfo.SetAccessControl(dSecurity); 71 | 72 | } 73 | 74 | 75 | 76 | 77 | // ======================================================================================= 78 | 79 | Thread msinfoThread = new Thread(MsinfoReportThread); //Start MSINFO Thread. 80 | msinfoThread.Start(); 81 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Started Collecting the MSINFO32 Report \n\n"); 82 | 83 | 84 | // ======================================================================================= 85 | 86 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Copying Dump files if any\n\n"); //Copy Dump files in case 87 | if (Directory.Exists(systemDrive + @"Windows\Minidump\")) //they exist 88 | foreach (var file in Directory.GetFiles(systemDrive + @"Windows\Minidump\")) 89 | { 90 | if (file != null) 91 | File.Copy(file, Path.Combine(tempDirectory, Path.GetFileName(file)), true); 92 | } 93 | 94 | // ====================================================================================== 95 | 96 | // ==================================================================================== 97 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating SystemInfo\n\n"); 98 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\systeminfo.txt")) 99 | { 100 | using (Process systeminfo = new Process()) 101 | { 102 | if (File.Exists(Environment.SystemDirectory + @"\systeminfo.exe")) 103 | { 104 | systeminfo.StartInfo.FileName = Environment.SystemDirectory + @"\systeminfo.exe"; 105 | systeminfo.StartInfo.RedirectStandardOutput = true; 106 | systeminfo.StartInfo.UseShellExecute = false; 107 | systeminfo.Start(); 108 | fileWriter.WriteLine(systeminfo.StandardOutput.ReadToEnd()); 109 | systeminfo.WaitForExit(); 110 | fileWriter.Close(); 111 | systeminfo.Close(); 112 | } 113 | else 114 | { 115 | Console.WriteLine("Systeminfo.exe not found in system"); 116 | } 117 | } 118 | 119 | } 120 | 121 | // ====================================================================================== 122 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Querying System for Drivers\n\n"); 123 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\drivertable.txt")) 124 | { 125 | using (Process driverTableQuery = new Process()) 126 | { 127 | if (File.Exists(Environment.SystemDirectory + @"\driverquery.exe")) 128 | { 129 | driverTableQuery.StartInfo.FileName = Environment.SystemDirectory + @"\driverquery.exe"; 130 | driverTableQuery.StartInfo.Arguments = @"/FO table /v"; 131 | driverTableQuery.StartInfo.RedirectStandardOutput = true; 132 | driverTableQuery.StartInfo.UseShellExecute = false; 133 | driverTableQuery.Start(); 134 | fileWriter.WriteLine(driverTableQuery.StandardOutput.ReadToEnd()); 135 | driverTableQuery.WaitForExit(); 136 | fileWriter.Close(); 137 | driverTableQuery.Close(); 138 | 139 | } 140 | else 141 | { 142 | Console.WriteLine("Driverquery.exe not found in system"); 143 | } 144 | 145 | } 146 | } 147 | 148 | // ====================================================================================== 149 | if (File.Exists(tempDirectory + @"\systeminfo.txt")) 150 | { 151 | using (StreamReader systeminfoReader = new StreamReader(tempDirectory + @"\systeminfo.txt")) 152 | //Filter out the email address from the report for privacy concerns 153 | { 154 | using (StreamWriter goodsysinfoWriter = new StreamWriter(tempDirectory + @"\goodsysteminfo.txt")) 155 | { 156 | int lineNumber = -1; 157 | while (systeminfoReader.Peek() >= 0) 158 | { 159 | string logFileContent = systeminfoReader.ReadLine(); 160 | lineNumber++; 161 | if (lineNumber == 7) 162 | continue; 163 | if (lineNumber == 14) 164 | if (logFileContent.Contains("x64")) 165 | is64BitOperatingSystem = true; 166 | 167 | goodsysinfoWriter.WriteLine(logFileContent); 168 | 169 | } 170 | } 171 | } 172 | } 173 | else 174 | Console.WriteLine("Cannot find SystemInfo.txt"); 175 | // ====================================================================================== 176 | 177 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\driverlist.txt")) 178 | { 179 | using (Process driverListQuery = new Process()) 180 | { 181 | if (File.Exists(Environment.SystemDirectory + @"\driverquery.exe")) 182 | { 183 | driverListQuery.StartInfo.FileName = Environment.SystemDirectory + @"\driverquery.exe"; 184 | driverListQuery.StartInfo.Arguments = @"/FO list"; 185 | driverListQuery.StartInfo.RedirectStandardOutput = true; 186 | driverListQuery.StartInfo.UseShellExecute = false; 187 | driverListQuery.Start(); 188 | fileWriter.WriteLine(driverListQuery.StandardOutput.ReadToEnd()); 189 | driverListQuery.WaitForExit(); 190 | fileWriter.Close(); 191 | driverListQuery.Close(); 192 | } 193 | else 194 | { 195 | Console.WriteLine("DriverQuery.exe not found in system"); 196 | } 197 | } 198 | 199 | } 200 | 201 | // ================================================================================== 202 | Console.WriteLine(DateTime.Now.ToString("G") + Environment.NewLine + "\t - Generating the DXDIAG Report" + 203 | Environment.NewLine); 204 | using (Process driverListQuery = new Process()) 205 | { 206 | if (File.Exists(Environment.SystemDirectory + @"\dxdiag.exe")) 207 | { 208 | driverListQuery.StartInfo.FileName = Environment.SystemDirectory + @"\dxdiag.exe"; 209 | driverListQuery.StartInfo.Arguments = @"/t " + "\"" + tempDirectory + @"\dxdiag.txt" + "\""; 210 | driverListQuery.Start(); 211 | driverListQuery.WaitForExit(); 212 | driverListQuery.Close(); 213 | } 214 | else 215 | { 216 | Console.WriteLine("DxDiag.exe not found in system"); 217 | } 218 | } 219 | 220 | // ================================================================================= 221 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating System Event Log\n\n"); 222 | using (Process eventviewerProcess = new Process()) 223 | { 224 | if (File.Exists(Environment.SystemDirectory + @"\wevtutil.exe")) 225 | { 226 | eventviewerProcess.StartInfo.FileName = Environment.SystemDirectory + @"\wevtutil.exe"; 227 | eventviewerProcess.StartInfo.Arguments = "epl " + "System " + "\"" + tempDirectory + 228 | @"\SystemEventLog.evtx" + "\""; 229 | eventviewerProcess.Start(); 230 | eventviewerProcess.WaitForExit(); 231 | eventviewerProcess.Close(); 232 | } 233 | else 234 | { 235 | Console.WriteLine("Wevtutil.exe not found in system"); 236 | } 237 | } 238 | 239 | // ================================================================================== 240 | 241 | // ================================================================================= 242 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating Application Event Log\n\n"); 243 | using (Process eventviewerProcess = new Process()) 244 | { 245 | if (File.Exists(Environment.SystemDirectory + @"\wevtutil.exe")) 246 | { 247 | eventviewerProcess.StartInfo.FileName = Environment.SystemDirectory + @"\wevtutil.exe"; 248 | eventviewerProcess.StartInfo.Arguments = "epl " + "Application " + "\"" + tempDirectory + 249 | @"\ApplicationEventLog.evtx" + "\""; 250 | eventviewerProcess.Start(); 251 | eventviewerProcess.WaitForExit(); 252 | eventviewerProcess.Close(); 253 | } 254 | else 255 | { 256 | Console.WriteLine("Wevtutil.exe not found in system"); 257 | } 258 | } 259 | 260 | // ================================================================================== 261 | 262 | if (File.Exists(Environment.SystemDirectory + @"\drivers\etc\hosts")) 263 | File.Copy(Environment.SystemDirectory + @"\drivers\etc\hosts", tempDirectory + @"\hosts.txt", true); 264 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Processing the HOSTS file\n\n"); 265 | 266 | // ================================================================================== 267 | Console.Write(DateTime.Now.ToString("G") + 268 | "\t - Generating detailed list of installed Windows Updates\n\n"); 269 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\InstalledWindowsUpdates.txt")) 270 | { 271 | using (Process wmicHotfixList = new Process()) 272 | { 273 | if (File.Exists(Environment.SystemDirectory + @"\wbem\wmic.exe")) 274 | { 275 | wmicHotfixList.StartInfo.FileName = Environment.SystemDirectory + @"\wbem\wmic.exe"; 276 | wmicHotfixList.StartInfo.Arguments = @"qfe list /format:table"; 277 | wmicHotfixList.StartInfo.RedirectStandardOutput = true; 278 | wmicHotfixList.StartInfo.UseShellExecute = false; 279 | wmicHotfixList.Start(); 280 | fileWriter.WriteLine(wmicHotfixList.StandardOutput.ReadToEnd()); 281 | wmicHotfixList.WaitForExit(); 282 | fileWriter.Close(); 283 | wmicHotfixList.Close(); 284 | } 285 | else 286 | { 287 | Console.WriteLine("WMIC.exe not found in system"); 288 | } 289 | } 290 | 291 | } 292 | 293 | // ================================================================================== 294 | if (is64BitOperatingSystem) 295 | { 296 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Exporting x86 Uninstall Registry\n\n"); 297 | 298 | using (Process uninstallListx86 = new Process()) 299 | { 300 | if (File.Exists(Environment.SystemDirectory + @"\reg.exe")) 301 | { 302 | uninstallListx86.StartInfo.FileName = Environment.SystemDirectory + @"\reg.exe"; 303 | uninstallListx86.StartInfo.Arguments = 304 | @"export HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\ " + "\"" + 305 | tempDirectory + 306 | @"\uninstallx86.txt" + "\"" +" /reg:32"; 307 | uninstallListx86.Start(); 308 | uninstallListx86.WaitForExit(); 309 | uninstallListx86.Close(); 310 | } 311 | else 312 | { 313 | Console.WriteLine("reg.exe not found in system"); 314 | } 315 | } 316 | } 317 | 318 | // ================================================================================= 319 | 320 | 321 | // ================================================================================ 322 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating Tasklist\n\n"); 323 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\tasklist.txt")) 324 | { 325 | using (Process taskList = new Process()) 326 | { 327 | if (File.Exists(Environment.SystemDirectory + @"\tasklist.exe")) 328 | { 329 | taskList.StartInfo.FileName = Environment.SystemDirectory + @"\tasklist.exe"; 330 | taskList.StartInfo.Arguments = "/fo:table"; 331 | taskList.StartInfo.RedirectStandardOutput = true; 332 | taskList.StartInfo.UseShellExecute = false; 333 | taskList.Start(); 334 | fileWriter.WriteLine(taskList.StandardOutput.ReadToEnd()); 335 | taskList.WaitForExit(); 336 | fileWriter.Close(); 337 | taskList.Close(); 338 | } 339 | else 340 | { 341 | Console.WriteLine("Tasklist.exe not found in system"); 342 | } 343 | } 344 | 345 | } 346 | 347 | // ================================================================================ 348 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating List of Currently Active Services\n\n"); 349 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\activeservices.txt")) 350 | { 351 | using (Process activeServices = new Process()) 352 | { 353 | if (File.Exists(Environment.SystemDirectory + @"\net.exe")) 354 | { 355 | activeServices.StartInfo.FileName = Environment.SystemDirectory + @"\net.exe"; 356 | activeServices.StartInfo.Arguments = "start"; 357 | activeServices.StartInfo.RedirectStandardOutput = true; 358 | activeServices.StartInfo.UseShellExecute = false; 359 | activeServices.Start(); 360 | fileWriter.WriteLine(activeServices.StandardOutput.ReadToEnd()); 361 | activeServices.WaitForExit(); 362 | fileWriter.Close(); 363 | activeServices.Close(); 364 | } 365 | else 366 | { 367 | Console.WriteLine("Net.exe not found in system"); 368 | } 369 | } 370 | 371 | } 372 | 373 | // ================================================================================ 374 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating List of All Services\n\n"); 375 | using (StreamWriter fileWriter = new StreamWriter(tempDirectory + @"\all_services_status.txt")) 376 | { 377 | using (Process allServicesList = new Process()) 378 | { 379 | if (File.Exists(Environment.SystemDirectory + @"\sc.exe")) 380 | { 381 | allServicesList.StartInfo.FileName = Environment.SystemDirectory + @"\sc.exe"; 382 | allServicesList.StartInfo.Arguments = "query"; 383 | allServicesList.StartInfo.RedirectStandardOutput = true; 384 | allServicesList.StartInfo.UseShellExecute = false; 385 | allServicesList.Start(); 386 | fileWriter.WriteLine(allServicesList.StandardOutput.ReadToEnd()); 387 | allServicesList.WaitForExit(); 388 | fileWriter.Close(); 389 | allServicesList.Close(); 390 | } 391 | else 392 | { 393 | Console.WriteLine("sc.exe not found in system"); 394 | } 395 | } 396 | 397 | } 398 | 399 | // ================================================================================= 400 | { 401 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Exporting Uninstall Registry\n\n"); 402 | 403 | using (Process uninstallListx64 = new Process()) 404 | { 405 | if (File.Exists(systemDrive + @"\Windows\System32\reg.exe")) 406 | { 407 | if (!is64BitOperatingSystem) 408 | { 409 | uninstallListx64.StartInfo.FileName = systemDrive + @"\Windows\System32\reg.exe"; 410 | uninstallListx64.StartInfo.Arguments = 411 | @"export HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall " + 412 | "\"" + tempDirectory + 413 | @"\uninstallx64.txt" + "\"" + "/reg:32"; 414 | } 415 | else 416 | { 417 | uninstallListx64.StartInfo.FileName = systemDrive + @"\Windows\System32\reg.exe"; 418 | uninstallListx64.StartInfo.Arguments = 419 | @"export HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall " + 420 | "\"" + tempDirectory + "\"" + 421 | @"\uninstallx64.txt " + "\"" + "/reg:64"; 422 | } 423 | uninstallListx64.StartInfo.UseShellExecute = false; 424 | uninstallListx64.StartInfo.RedirectStandardOutput = true; 425 | uninstallListx64.Start(); 426 | uninstallListx64.WaitForExit(); 427 | uninstallListx64.Close(); 428 | } 429 | else 430 | { 431 | Console.WriteLine("reg.exe not found in system"); 432 | } 433 | Console.WriteLine("HelloWorld"); 434 | } 435 | 436 | } 437 | 438 | // ================================================================================= 439 | 440 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Collecting Miscellaneous Data\n\n"); 441 | 442 | RegistryKey werSvcKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\WerSVC"); //Check if Windows Error Reporting Service Is Running Or Not 443 | string werStatus = (werSvcKey != null) 444 | ? Convert.ToString(werSvcKey.GetValue("Start")) 445 | : "werSVCKey Not Found"; 446 | 447 | // ================================================================================ 448 | 449 | RegistryKey kmsService = //Check if Windows installation is Legit or not 450 | Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\Service KMSELDI"); 451 | var kmsStatus = (kmsService == null) ? 0 : 1; 452 | 453 | // ================================================================================ 454 | 455 | // ================================================================================ 456 | 457 | RegistryKey dumpType = //Check the type of Dump the system is configured to generate 458 | Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\CrashControl"); 459 | string dumpTypeString = ""; 460 | if (dumpType!=null) 461 | { 462 | int dumpTypeValue = Convert.ToInt32(dumpType.GetValue("CrashDumpEnabled")); 463 | switch (dumpTypeValue) 464 | { 465 | case 0: 466 | { 467 | dumpTypeString = "System Is NOT Configured to generate dump files"; 468 | break; 469 | } 470 | case 3: 471 | { 472 | dumpTypeString = "Small Memory Dump (256KB)"; 473 | break; 474 | } 475 | case 2: 476 | { 477 | dumpTypeString = "Kernel Memory Dump"; 478 | break; 479 | } 480 | case 1: 481 | { 482 | dumpTypeString = "Complete Memory Dump or Active Memory Dump"; 483 | break; 484 | } 485 | case 7: 486 | { 487 | dumpTypeString = "Automatic Memory Dump"; 488 | break; 489 | } 490 | default: 491 | { 492 | dumpTypeString = "Couldn't calculate Dump Type from Registry"; 493 | break; 494 | } 495 | } 496 | } 497 | 498 | 499 | // ================================================================================ 500 | 501 | string bootUpState = "", pagefilemanagement = ""; //Process WMI Commands 502 | using (Process wmic = new Process()) 503 | { 504 | if (File.Exists(Environment.SystemDirectory + @"\wbem\wmic.exe")) 505 | { 506 | wmic.StartInfo.FileName = Environment.SystemDirectory + @"\wbem\wmic.exe"; 507 | 508 | wmic.StartInfo.Arguments = "COMPUTERSYSTEM get BOOTUPSTATE /value"; 509 | wmic.StartInfo.UseShellExecute = false; 510 | wmic.StartInfo.RedirectStandardOutput = true; 511 | wmic.Start(); 512 | string output = wmic.StandardOutput.ReadToEnd(); 513 | wmic.WaitForExit(); 514 | wmic.Close(); 515 | output = output.Replace("\n", ""); 516 | bootUpState = output.Contains("BootupState") ? output.Replace("BootupState=", "") : "Cannot Query BootupState"; 517 | wmic.StartInfo.Arguments = "computersystem get AutomaticManagedPageFile /value"; 518 | wmic.Start(); 519 | pagefilemanagement = wmic.StandardOutput.ReadToEnd(); 520 | wmic.WaitForExit(); 521 | wmic.Close(); 522 | pagefilemanagement = pagefilemanagement.Replace("\n", ""); 523 | pagefilemanagement = pagefilemanagement.Replace("AutomaticManagedPageFile", ""); 524 | } 525 | else 526 | Console.WriteLine("WMIC.EXE Does not exist on the system"); 527 | } 528 | 529 | // =============================================================================== 530 | 531 | if (!File.Exists(tempDirectory + @"\uninstallx86.txt")) 532 | { 533 | File.Create(tempDirectory + @"\uninstallx86.txt"); 534 | Console.WriteLine(DateTime.Now.ToString("G") + 535 | "\t - Blank File for x86 Uninstall List Created\n\n"); 536 | } 537 | if (!File.Exists(tempDirectory + @"\uninstallx64.txt")) 538 | { 539 | File.Create(tempDirectory + @"\uninstallx64.txt"); 540 | Console.WriteLine(DateTime.Now.ToString("G") + 541 | "\t - Blank File for x64 Uninstall List Created\n\n"); 542 | } 543 | /*using (var output = File.Create(tempDirectory + @"\uninstall-reg.txt")) 544 | { 545 | foreach ( 546 | var file in new[] { tempDirectory + @"\uninstallx86.txt", tempDirectory + @"\uninstallx64.txt" }) 547 | { 548 | using (var input = File.OpenRead(file)) 549 | { 550 | input.CopyTo(output); 551 | } 552 | } 553 | }*/ 554 | using (StreamReader uninstallx86Reader = new StreamReader(tempDirectory + @"\uninstallx86.txt")) 555 | { 556 | using (StreamReader uninstallx64Reader = new StreamReader(tempDirectory + @"\uninstallx64.txt")) 557 | { 558 | using (StreamWriter uninstallRegWriter = new StreamWriter(tempDirectory + @"\uninstall-reg.txt")) 559 | { 560 | while (uninstallx86Reader.Peek() >= 0) 561 | { 562 | uninstallRegWriter.WriteLine(uninstallx86Reader.ReadLine()); 563 | } 564 | while (uninstallx64Reader.Peek() >= 0) 565 | { 566 | uninstallRegWriter.WriteLine(uninstallx64Reader.ReadLine()); 567 | } 568 | } 569 | } 570 | } 571 | 572 | 573 | //Process the exported uninstall registry and filter out values and compile a single list 574 | using ( 575 | StreamReader uninstallcombinedListReader = new StreamReader(tempDirectory + @"\uninstall-reg.txt")) 576 | { 577 | using ( 578 | StreamWriter filteredUninstallListWriter = 579 | new StreamWriter(tempDirectory + @"\duplicatesimpleUninstall.txt")) 580 | { 581 | while (uninstallcombinedListReader.Peek() >= 0) 582 | { 583 | string logFileContent = uninstallcombinedListReader.ReadLine(); 584 | string name = "", version = "", publisher = ""; 585 | if (logFileContent != null && logFileContent.Contains(@"[HKEY_LOCAL_MACHINE\")) 586 | { 587 | while (logFileContent != "") 588 | { 589 | logFileContent = uninstallcombinedListReader.ReadLine(); 590 | if (logFileContent != null && logFileContent.Contains("\"DisplayName\"")) 591 | { 592 | logFileContent = logFileContent.Replace("\"", ""); 593 | logFileContent = logFileContent.Replace("DisplayName=", ""); 594 | name = logFileContent + " ("; 595 | } 596 | if (logFileContent != null && logFileContent.Contains("\"DisplayVersion\"")) 597 | { 598 | logFileContent = logFileContent.Replace("\"", ""); 599 | logFileContent = logFileContent.Replace("DisplayVersion=", ""); 600 | version = "Version : " + logFileContent + " - "; 601 | } 602 | if (logFileContent != null && logFileContent.Contains("\"Publisher\"")) 603 | { 604 | logFileContent = logFileContent.Replace("\"", ""); 605 | logFileContent = logFileContent.Replace("Publisher=", ""); 606 | publisher = logFileContent + " )"; 607 | } 608 | 609 | } 610 | if (name != "" && version != "" && publisher != "") 611 | filteredUninstallListWriter.WriteLine(name + version + publisher); 612 | } 613 | } 614 | } 615 | 616 | } 617 | 618 | string infile = tempDirectory + @"\duplicatesimpleUninstall.txt"; //Logic to merge x86 & x64 Uninstall Lists 619 | string outfile = tempDirectory + @"\simpleuninstall.txt"; 620 | var contents = File.ReadAllLines(infile); 621 | Array.Sort(contents); 622 | File.WriteAllLines(outfile, contents); 623 | Console.WriteLine(DateTime.Now.ToString("G") + 624 | "\t - Collecting List of Programs Installed On The System\n\n"); 625 | using (TextReader reader = File.OpenText(outfile)) 626 | { 627 | using (TextWriter writer = File.CreateText(tempDirectory + @"\uninstalllist.txt")) 628 | { 629 | string currentLine; 630 | string lastLine = null; 631 | 632 | while ((currentLine = reader.ReadLine()) != null) 633 | { 634 | if (currentLine != lastLine) 635 | { 636 | writer.WriteLine(currentLine); 637 | lastLine = currentLine; 638 | } 639 | } 640 | } 641 | } 642 | 643 | 644 | string osInstallDate = "", 645 | systemManufacturer = "", 646 | systemModel = "", 647 | biosVersion = "", 648 | pageFileLocation = "", 649 | pageFileSize = ""; 650 | int hotfixInstalled = 0; 651 | 652 | 653 | using (Process wmic = new Process()) //More WMI Processing. Need to merge this 654 | { 655 | if (File.Exists(Environment.SystemDirectory + @"\wbem\wmic.exe")) 656 | { 657 | wmic.StartInfo.FileName = Environment.SystemDirectory + @"\wbem\wmic.exe"; 658 | 659 | wmic.StartInfo.Arguments = "os get installdate /value"; 660 | wmic.StartInfo.UseShellExecute = false; 661 | wmic.StartInfo.RedirectStandardOutput = true; 662 | wmic.Start(); 663 | osInstallDate = wmic.StandardOutput.ReadToEnd(); 664 | wmic.WaitForExit(); 665 | wmic.Close(); 666 | osInstallDate = osInstallDate.Replace("\n", "").Replace("InstallDate=", ""); 667 | osInstallDate = ConvertDateTime(osInstallDate); 668 | 669 | wmic.StartInfo.Arguments = "computersystem get manufacturer /value"; 670 | wmic.Start(); 671 | systemManufacturer = wmic.StandardOutput.ReadToEnd(); 672 | wmic.WaitForExit(); 673 | wmic.Close(); 674 | systemManufacturer = systemManufacturer.Replace("\n", "").Replace("Manufacturer=", ""); 675 | 676 | wmic.StartInfo.Arguments = "computersystem get model /value"; 677 | wmic.Start(); 678 | systemModel = wmic.StandardOutput.ReadToEnd(); 679 | wmic.WaitForExit(); 680 | wmic.Close(); 681 | systemModel = systemModel.Replace("\n", "").Replace("Model=", ""); 682 | 683 | wmic.StartInfo.Arguments = "bios get ReleaseDate /value"; 684 | wmic.Start(); 685 | biosVersion = wmic.StandardOutput.ReadToEnd(); 686 | wmic.WaitForExit(); 687 | wmic.Close(); 688 | biosVersion = biosVersion.Replace("\n", "").Replace("ReleaseDate=", ""); 689 | biosVersion = ConvertDateTime(biosVersion); 690 | 691 | wmic.StartInfo.Arguments = "pagefile get Description /value"; 692 | wmic.Start(); 693 | pageFileLocation = wmic.StandardOutput.ReadToEnd(); 694 | wmic.WaitForExit(); 695 | wmic.Close(); 696 | pageFileLocation = pageFileLocation.Replace("\n", "").Replace("Description=", ""); 697 | 698 | wmic.StartInfo.Arguments = "pagefile get AllocatedBaseSize /value"; 699 | wmic.Start(); 700 | pageFileSize = wmic.StandardOutput.ReadToEnd(); 701 | wmic.WaitForExit(); 702 | wmic.Close(); 703 | pageFileSize = pageFileSize.Replace("\n", "").Replace("AllocatedBaseSize=", ""); 704 | pageFileSize += " MB"; 705 | 706 | } 707 | } 708 | 709 | using (StreamReader hotFixReader = new StreamReader(tempDirectory + @"\InstalledWindowsUpdates.txt")) //Check the number of Windows Updates installed on a system 710 | { 711 | while (hotFixReader.Peek() >= 0) 712 | { 713 | string logFileContent = hotFixReader.ReadLine(); 714 | if(logFileContent != null && logFileContent.Contains(@"http://")) 715 | hotfixInstalled++; 716 | 717 | } 718 | } 719 | ///////////////////////////////////////////////////////////////////////////// 720 | // BSOD Inspector Log Writer // 721 | /////////////////////////////////////////////////////////////////////////// 722 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Generating Inspector Log File\n\n"); 723 | using (StreamWriter bsodInspectorWriter = new StreamWriter(tempDirectory + @"\BSODInspector.txt")) 724 | { 725 | 726 | 727 | bsodInspectorWriter.Write( 728 | "========================================================" + Environment.NewLine + 729 | "############" + Environment.NewLine + "BSOD Inspector by blueelvis" + Environment.NewLine + 730 | "Special Thanks - John D. Carrona (Microsoft MVP)" + Environment.NewLine + Environment.NewLine); 731 | bsodInspectorWriter.WriteLine("Version : " + applicationVersion); 732 | bsodInspectorWriter.WriteLine("OS : " + sysinfo.OSFullName); 733 | bsodInspectorWriter.WriteLine("Boot Mode : " + bootUpState); 734 | bsodInspectorWriter.WriteLine("OS Install Date : " + osInstallDate); 735 | bsodInspectorWriter.WriteLine("Dump Type : " + dumpTypeString); 736 | bsodInspectorWriter.Write(Environment.NewLine + 737 | "========================================================" + 738 | Environment.NewLine + Environment.NewLine); 739 | bsodInspectorWriter.Write("### SYSTEM INFO ###" + Environment.NewLine); 740 | 741 | string antiviruswmipath = @"\\" + Environment.MachineName + @"\root\SecurityCenter2"; 742 | string antivirusList = String.Empty; 743 | 744 | ObjectQuery antivirusObjectQuery = new ObjectQuery("SELECT displayName from AntivirusProduct"); 745 | ManagementObjectSearcher avSearcher = new ManagementObjectSearcher(antiviruswmipath, 746 | antivirusObjectQuery.QueryString); 747 | ManagementObjectCollection avcollection = avSearcher.Get(); 748 | foreach (var o in avcollection) //Get the list of Antivirus solutions installed on a system 749 | { 750 | if (o != null) 751 | { 752 | var av = (ManagementObject)o; 753 | if (av["displayName"].ToString()!="Antivirus") 754 | { 755 | antivirusList = antivirusList + av["displayName"] + ","; 756 | } 757 | 758 | } 759 | } 760 | 761 | if (antivirusList == "" || antivirusList.Length <= 0) 762 | antivirusList = "No Antivirus Found"; 763 | else 764 | antivirusList.Remove(antivirusList.Length - 1); 765 | bsodInspectorWriter.WriteLine("Antivirus = " + antivirusList); 766 | bsodInspectorWriter.WriteLine(kmsStatus == 0 ? "Activation = KMS NOT FOUND" : "Activation = Not Genuine"); 767 | 768 | bsodInspectorWriter.WriteLine("Windows Updates = " + hotfixInstalled.ToString() + " Updates Installed"); 769 | bsodInspectorWriter.WriteLine("Manufacturer = " + systemManufacturer); 770 | bsodInspectorWriter.WriteLine("Model = " + systemModel); 771 | bsodInspectorWriter.WriteLine("BIOS = " + biosVersion); 772 | bsodInspectorWriter.Write(Environment.NewLine + Environment.NewLine + 773 | "### Dump Generation Settings ###" + Environment.NewLine); 774 | bsodInspectorWriter.WriteLine(File.Exists(systemDrive + @"\pagefile.sys") 775 | ? "Pagefile Location = Found on OS drive!" 776 | : "Pagefile Location = Pagefile Not Found on OS Drive!"); 777 | 778 | bsodInspectorWriter.WriteLine("Pagefile Size = " + pageFileSize); 779 | 780 | bsodInspectorWriter.WriteLine(pagefilemanagement.Contains("TRUE") 781 | ? "Pagefile Managed by System = TRUE" 782 | : "Pagefile Managed by System = FALSE"); 783 | 784 | bsodInspectorWriter.WriteLine(werStatus == "3" 785 | ? "WER Service Status = Set to Manual" 786 | : "WER Service Status = Not Manual!"); 787 | bsodInspectorWriter.Write(Environment.NewLine + Environment.NewLine + "### DUMP FILE LIST ###" + 788 | Environment.NewLine + Environment.NewLine); 789 | 790 | if (Directory.Exists(systemDrive + @"Windows\Minidump")) //Write the list of Minidumps & their Date Of Creation 791 | foreach (var file in Directory.GetFiles(systemDrive + @"Windows\Minidump")) 792 | { 793 | if (file != null) 794 | { 795 | bsodInspectorWriter.Write(Environment.NewLine); 796 | bsodInspectorWriter.Write(file + "\t\t"); 797 | bsodInspectorWriter.Write(File.GetCreationTimeUtc(file)); 798 | 799 | } 800 | } 801 | bsodInspectorWriter.WriteLine(Environment.NewLine); 802 | if (File.Exists(systemDrive + @"Windows\Memory.DMP")) //Check whether a Memory.DMP exists or not 803 | { 804 | FileInfo memoryDump = new FileInfo(systemDrive + @"Windows\Memory.DMP"); 805 | bsodInspectorWriter.WriteLine("->MEMORY.DMP Found"); 806 | bsodInspectorWriter.WriteLine("Size = " + memoryDump.Length / (1024 * 1024) + " MB"); 807 | bsodInspectorWriter.WriteLine("Date Of Creation = " + 808 | "\t\t" + File.GetCreationTimeUtc(systemDrive + @"Windows\Memory.DMP")); 809 | } 810 | else 811 | { 812 | bsodInspectorWriter.WriteLine("MEMORY.DMP not found"); 813 | } 814 | 815 | string systemRestorewmipath = @"\\" + Environment.MachineName + @"\root\default"; 816 | 817 | ObjectQuery sysRestoreObjectQuery = new ObjectQuery("SELECT * from SystemRestore"); //Get list of System Restore Points 818 | 819 | ManagementObjectSearcher srSearcher = new ManagementObjectSearcher(systemRestorewmipath, 820 | sysRestoreObjectQuery.QueryString); 821 | 822 | ManagementObjectCollection srcollection = srSearcher.Get(); 823 | 824 | bsodInspectorWriter.Write(Environment.NewLine + Environment.NewLine + 825 | "### RECOVERY POINTS PRESENT ###" + Environment.NewLine + 826 | "Description \t\t\t\t Date Of Creation" + Environment.NewLine); 827 | foreach (var o in srcollection) 828 | { 829 | var sr = (ManagementObject)o; 830 | if (sr == null) continue; 831 | 832 | if (sr["Description"].ToString().Contains("Windows Update")) 833 | bsodInspectorWriter.Write(sr["Description"] + "\t\t\t\t"); 834 | else 835 | bsodInspectorWriter.Write(sr["Description"] + "\t\t\t"); 836 | var creationTime = sr["CreationTime"].ToString(); 837 | creationTime = ConvertDateTime(creationTime); 838 | bsodInspectorWriter.Write(creationTime + Environment.NewLine); 839 | } 840 | if (srcollection.Count == 0) 841 | bsodInspectorWriter.Write(Environment.NewLine + "No Recovery Points Found" + 842 | Environment.NewLine); 843 | bsodInspectorWriter.WriteLine(Environment.NewLine + Environment.NewLine + "### MEMORY INFO ###"); 844 | bsodInspectorWriter.WriteLine("Total RAM = " + sysinfo.TotalPhysicalMemory / (1024 * 1024) + " MB"); 845 | bsodInspectorWriter.WriteLine("Available RAM = " + sysinfo.AvailablePhysicalMemory / (1024 * 1024) + 846 | " MB"); 847 | bsodInspectorWriter.WriteLine("PageFile Location = "+pageFileLocation); 848 | bsodInspectorWriter.WriteLine("Pagefile Size = " + pageFileSize); 849 | bsodInspectorWriter.Write(Environment.NewLine + Environment.NewLine + 850 | "~~~~~~~~~~~~~~~~~~~~~~~~~~~EOF~~~~~~~~~~~~~~~~~~~~~~~~~"); 851 | } 852 | 853 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Removing Temporary Files\n\n"); 854 | File.Delete(tempDirectory + @"\duplicatesimpleuninstall.txt"); 855 | File.Delete(infile); 856 | File.Delete(outfile); 857 | File.Delete(tempDirectory + @"\uninstall-reg.txt"); 858 | File.Delete(tempDirectory + @"\systeminfo.txt"); 859 | File.Move(tempDirectory + @"\goodsysteminfo.txt", tempDirectory + @"\systeminfo.txt"); 860 | File.Delete(tempDirectory + @"\goodsysteminfo.txt"); 861 | using (StreamWriter greetings = new StreamWriter(tempDirectory + @"\greetings.txt")) 862 | { 863 | greetings.WriteLine("Greetings ^_^," + Environment.NewLine + Environment.NewLine + 864 | "The application has completed its job of collecting the diagnostics of your system." + 865 | Environment.NewLine + 866 | " Below are the details for the location of the ZIP file generated by this application -" + 867 | Environment.NewLine + Environment.NewLine + "Filename = " + zipFileName + 868 | Environment.NewLine + "Location = " + 869 | Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + 870 | Environment.NewLine + Environment.NewLine); 871 | string quote = Quotes(); 872 | if (quote != "0") 873 | { 874 | greetings.WriteLine(Environment.NewLine + "Do You Know?" + Environment.NewLine + quote); 875 | Console.WriteLine(Environment.NewLine + "Do You Know?" + Environment.NewLine + quote + 876 | Environment.NewLine); 877 | } 878 | else 879 | { 880 | greetings.WriteLine("Do You Know?" + Environment.NewLine + 881 | "The Blue Screen Of Death which is produced by Windows is a way to protect your data from corruption. " + 882 | Environment.NewLine + 883 | "Windows has got some serious rules to protect your data ;)"); 884 | } 885 | 886 | greetings.WriteLine(Environment.NewLine + Environment.NewLine + 887 | "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~EOF~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 888 | 889 | } 890 | 891 | while (msinfoThread.IsAlive) //If the MSINFO thread is still alive, keep waiting. It takes some time. 892 | { 893 | Console.WriteLine(DateTime.Now.ToString("G") + Environment.NewLine + 894 | "\t - Processing MSINFO32 Report. Kindly do not close app...\n"); 895 | Thread.Sleep(8000); 896 | } 897 | Console.WriteLine(DateTime.Now.ToString("G") + "\t - Zipping Up Files!"); 898 | bool zipFileStatus = ZipFile(tempDirectory, zipFileName); 899 | if (!zipFileStatus) 900 | { 901 | Console.WriteLine("There was an error while creating the ZIP file"); 902 | } 903 | var greetingsProcess = Process.Start(tempDirectory + @"\greetings.txt"); 904 | Thread.Sleep(1000); 905 | if (greetingsProcess!=null) //Flash the taskbar icon of Notepad in case user has lost focus 906 | { 907 | FlashWindow(greetingsProcess.MainWindowHandle, false); 908 | } 909 | } 910 | 911 | 912 | /// 913 | /// Separate thread to collect the MSINFO32 Report. 914 | /// 915 | static void MsinfoReportThread() 916 | { 917 | string tempDirectory = Path.GetTempPath() + @"blueelvis"; 918 | using (Process msinfoNfoReport = new Process()) 919 | { 920 | if (File.Exists(Environment.SystemDirectory + @"\msinfo32.exe")) 921 | { 922 | Console.WriteLine(Environment.NewLine + Environment.NewLine + DateTime.Now.ToString("G") + 923 | "\t - Generating MSINFO32 Report" + Environment.NewLine); 924 | msinfoNfoReport.StartInfo.FileName = Environment.SystemDirectory + @"\msinfo32.exe"; 925 | msinfoNfoReport.StartInfo.Arguments = @"/nfo " + "\"" + tempDirectory + @"\MSINFO32.NFO" + "\""; 926 | msinfoNfoReport.Start(); 927 | msinfoNfoReport.WaitForExit(); 928 | msinfoNfoReport.Close(); 929 | } 930 | else 931 | { 932 | Console.WriteLine("MSINFO32.exe not found in system"); 933 | } 934 | } 935 | } 936 | 937 | /// 938 | /// Function to query and return a quote from the blog. 939 | /// 940 | /// Returns 0 on error and a "STRING" on success. 941 | 942 | static string Quotes() 943 | { 944 | WebClient quoteWebClient = new WebClient(); 945 | try 946 | { 947 | string quoteString = quoteWebClient.DownloadString("https://omgdebugging.com/quote.php"); 948 | return quoteString == "0" ? "0" : quoteString; 949 | } 950 | catch (Exception) 951 | { 952 | return "0"; 953 | } 954 | } 955 | 956 | /// 957 | /// Zip File mechanism using Shell32. Easiest way to do without any 3rd party API 958 | /// 959 | /// 960 | /// 961 | /// 962 | private static bool ZipFile(string inputPath, string zipFileName) 963 | { 964 | byte[] emptyzip = new byte[]{80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; 965 | FileStream fs = File.Create(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\" + 966 | zipFileName); 967 | fs.Write(emptyzip,0,emptyzip.Length); 968 | fs.Flush(); 969 | fs.Close(); 970 | try 971 | { 972 | Shell32.Folder zipInput = GetShell32NameSpace(inputPath); 973 | Shell32.Folder zipOutput = 974 | GetShell32NameSpace(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\" + 975 | zipFileName); 976 | foreach (var file in zipInput.Items()) 977 | { 978 | if (file != null) 979 | zipOutput.CopyHere(file, 4 | 16); 980 | Thread.Sleep(1000); 981 | } 982 | return true; 983 | } 984 | catch (Exception) 985 | { 986 | return false; 987 | } 988 | } 989 | 990 | /// 991 | /// Converts the Date & Time which is generated by several WMI commands into human readable form 992 | /// 993 | /// String parameter which contains the date & time outputted by several WMI Commands 994 | /// Returns a string containing the date & time 995 | private static string ConvertDateTime(string stringDateToConvert) 996 | { 997 | stringDateToConvert = stringDateToConvert.Replace("\r", "").Replace("\n", ""); 998 | if (stringDateToConvert.Length > 8) 999 | stringDateToConvert = stringDateToConvert.Remove(8); 1000 | 1001 | var temporaryArray = stringDateToConvert.ToCharArray(); 1002 | var output = temporaryArray[0].ToString() + temporaryArray[1].ToString() + temporaryArray[2].ToString() + 1003 | temporaryArray[3].ToString() + "-"; 1004 | output += temporaryArray[4].ToString() + temporaryArray[5].ToString() + "-"; 1005 | output += temporaryArray[6].ToString() + temporaryArray[7].ToString(); 1006 | 1007 | return output; 1008 | } 1009 | 1010 | /// 1011 | /// Shell32 Code Since Shell32 changed in Windows 7. Read More over here - http://techitongue.blogspot.in/2012/06/shell32-code-compiled-on-windows-7.html 1012 | /// 1013 | /// 1014 | /// 1015 | static public Shell32.Folder GetShell32NameSpace(Object folder) 1016 | { 1017 | Type shellAppType = Type.GetTypeFromProgID("Shell.Application"); 1018 | var shell = Activator.CreateInstance(shellAppType); 1019 | return (Shell32.Folder)shellAppType.InvokeMember("NameSpace", System.Reflection.BindingFlags.InvokeMethod, null, shell, new[] { folder }); 1020 | } 1021 | } 1022 | } 1023 | --------------------------------------------------------------------------------