diff --git a/App.config b/App.config new file mode 100644 index 0000000..2bb2d87 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..a0f7ec4 --- /dev/null +++ b/LICENCE @@ -0,0 +1,25 @@ + GLWT(Good Luck With That) Public License + Copyright (c) Everyone, except Author + +Everyone is permitted to copy, distribute, modify, merge, sell, publish, +sublicense or whatever they want with this software but at their OWN RISK. + + Preamble + +The author has absolutely no clue what the code in this project does. +It might just work or not, there is no third option. + + + GOOD LUCK WITH THAT PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION + + 0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A +TRACE TO TRACK THE AUTHOR of the original product to blame for or hold +responsible. + +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Good luck and Godspeed. diff --git a/Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab b/Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab new file mode 100644 index 0000000..7054f6a Binary files /dev/null and b/Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab differ diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..43904be --- /dev/null +++ b/Program.cs @@ -0,0 +1,50 @@ +using System; +using System.IO; +using System.Reflection; +using System.Diagnostics; + +namespace dotnetfx35installer { + class Program { + static string[] files = { + "microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab", + "Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab" + }; + + static void Main(string[] _) { + Console.Title = "dotnetfx35installer"; + string outdir = Path.GetTempPath() + @"dotnetfx35installer\"; + Console.WriteLine("Writing temporary installation files to " + outdir); + Console.Write("Does this look correct? Press 'y' continue: "); + var confirm = Console.ReadKey().KeyChar; + Console.Clear(); + if (confirm != 'y') { + return; + } + if (Directory.Exists(outdir)) { + Directory.Delete(outdir, true); + } + + Directory.CreateDirectory(outdir); + var assembly = Assembly.GetExecutingAssembly(); + foreach (var filename in files) { + var stream = assembly.GetManifestResourceStream($"dotnetfx35installer.{filename}"); + var output = File.Open(outdir + filename, FileMode.CreateNew); + stream.CopyTo(output); + stream.Dispose(); + output.Dispose(); + } + + var dism = @"C:\Windows\System32\dism.exe"; + var args = $"/Online /Enable-Feature /FeatureName:NetFX3 /All /LimitAccess /Source:{outdir}"; + Console.WriteLine("Running DISM:"); + Console.WriteLine($"{dism} {args}"); + Process.Start(dism, args).WaitForExit(); + Console.WriteLine("\nFinished... probably...?"); + Console.Title = "yay?"; + Console.WriteLine($"Removing {outdir}"); + Directory.Delete(outdir, true); + Console.WriteLine("Press any key to exit..."); + Console.ReadKey(); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3b9cd55 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("dotnetfx35installer")] +[assembly: AssemblyDescription("It installs Dotnet Framework 3.5")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("dotnetfx35installer")] +[assembly: AssemblyCopyright("Copyright © Everyone, except Author 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("709fa7fe-1b9a-4839-8612-e457b6734ef6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/README.md b/README.md new file mode 100644 index 0000000..12c7a0a --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# dotnetfx35installer + +Fixes Errors +- `0x80070422` +- `0x800F0950` +- `0x800F0922` + +Probably Fixes +- `0x800F0906` +- `0x800F081F` +- `0x800F0907` + +## Instructions + +Just download `dotnetfx35installer.exe` and run it. That's it. + +**You don't need the installation media. It's packaged in the executable!** + +## Rant + +It seems like quite a few people have an issue installing the Dotnet Framework 3.5. +I was one of them. All the guides on how to fix this said to just download a new +Windows ISO and grab the required installation files and use `DISM` to load it into +Windows 10. Well, that's dumb. I'm not going to wait two hours just to take a +couple of files out of the ISO. Spoiler: I did. So here are the files that you need +to install Dotnet Framework 3.5. I'm not really sure about how legal this is to +be redistributing these so don't hurt me, Microsoft. I'm really just trying to help +out here. I'm not stealing anyone's data and I'm not making any money off of this +redistribution. + +I hope this ends up helping someone. diff --git a/app.manifest b/app.manifest new file mode 100644 index 0000000..f53ca19 --- /dev/null +++ b/app.manifest @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + diff --git a/dotnetfx35installer.csproj b/dotnetfx35installer.csproj new file mode 100644 index 0000000..58c6f89 --- /dev/null +++ b/dotnetfx35installer.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {709FA7FE-1B9A-4839-8612-E457B6734EF6} + Exe + dotnetfx35installer + dotnetfx35installer + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + app.manifest + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dotnetfx35installer.sln b/dotnetfx35installer.sln new file mode 100644 index 0000000..ca0709f --- /dev/null +++ b/dotnetfx35installer.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29306.81 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetfx35installer", "dotnetfx35installer.csproj", "{709FA7FE-1B9A-4839-8612-E457B6734EF6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {709FA7FE-1B9A-4839-8612-E457B6734EF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {709FA7FE-1B9A-4839-8612-E457B6734EF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {709FA7FE-1B9A-4839-8612-E457B6734EF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {709FA7FE-1B9A-4839-8612-E457B6734EF6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F3F6E4E7-E4B3-48AA-BB26-EA13E63ECD93} + EndGlobalSection +EndGlobal diff --git a/microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab b/microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab new file mode 100644 index 0000000..c0decf2 Binary files /dev/null and b/microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab differ