Skip to content

Commit

Permalink
inb4 this repo gets taken down
Browse files Browse the repository at this point in the history
  • Loading branch information
falfiya committed Sep 11, 2019
0 parents commit 58fb6f3
Show file tree
Hide file tree
Showing 10 changed files with 252 additions and 0 deletions.
6 changes: 6 additions & 0 deletions App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
25 changes: 25 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -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.
Binary file not shown.
50 changes: 50 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
36 changes: 36 additions & 0 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 17 additions & 0 deletions app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0"
xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>
62 changes: 62 additions & 0 deletions dotnetfx35installer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{709FA7FE-1B9A-4839-8612-E457B6734EF6}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>dotnetfx35installer</RootNamespace>
<AssemblyName>dotnetfx35installer</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="app.manifest" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab" />
<EmbeddedResource Include="microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 25 additions & 0 deletions dotnetfx35installer.sln
Original file line number Diff line number Diff line change
@@ -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
Binary file not shown.

0 comments on commit 58fb6f3

Please sign in to comment.