diff --git a/CortanaConfigurator.sln b/CortanaConfigurator.sln new file mode 100644 index 0000000..2058d6f --- /dev/null +++ b/CortanaConfigurator.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2041 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CortanaConfigurator", "CortanaConfigurator\CortanaConfigurator.csproj", "{EF9B9046-0E92-41B1-A263-0D2D748C03A1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EF9B9046-0E92-41B1-A263-0D2D748C03A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF9B9046-0E92-41B1-A263-0D2D748C03A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF9B9046-0E92-41B1-A263-0D2D748C03A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF9B9046-0E92-41B1-A263-0D2D748C03A1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {601F576C-2246-474F-810E-B4ACBDAFDE8D} + EndGlobalSection +EndGlobal diff --git a/CortanaConfigurator/.vs/CortanaConfigurator/v15/.suo b/CortanaConfigurator/.vs/CortanaConfigurator/v15/.suo new file mode 100644 index 0000000..0da237b Binary files /dev/null and b/CortanaConfigurator/.vs/CortanaConfigurator/v15/.suo differ diff --git a/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/db.lock b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide new file mode 100644 index 0000000..56758a8 Binary files /dev/null and b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide differ diff --git a/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide-shm b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide-shm new file mode 100644 index 0000000..d4a136b Binary files /dev/null and b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide-shm differ diff --git a/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide-wal b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide-wal new file mode 100644 index 0000000..6dbe0e5 Binary files /dev/null and b/CortanaConfigurator/.vs/CortanaConfigurator/v15/Server/sqlite3/storage.ide-wal differ diff --git a/CortanaConfigurator/870666_200_K4E_icon.ico b/CortanaConfigurator/870666_200_K4E_icon.ico new file mode 100644 index 0000000..d945467 Binary files /dev/null and b/CortanaConfigurator/870666_200_K4E_icon.ico differ diff --git a/CortanaConfigurator/App.config b/CortanaConfigurator/App.config new file mode 100644 index 0000000..d1428ad --- /dev/null +++ b/CortanaConfigurator/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/CortanaConfigurator/CortanaConfigurator.csproj b/CortanaConfigurator/CortanaConfigurator.csproj new file mode 100644 index 0000000..0b11b19 --- /dev/null +++ b/CortanaConfigurator/CortanaConfigurator.csproj @@ -0,0 +1,121 @@ + + + + + Debug + AnyCPU + {EF9B9046-0E92-41B1-A263-0D2D748C03A1} + Exe + CortanaConfigurator + Cortana Configurator + v4.5 + 512 + true + true + + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + false + + + ConsoleApp1.Program + + + cortana_icon_3YL_icon.ico + + + + true + + + 9325FC8165529518CBE3914A6252B0DB31440A4D + + + true + + + + + + + LocalIntranet + + + false + + + Properties\app.manifest + + + + + + ..\packages\System.Management.Automation.dll.10.0.10586.0\lib\net40\System.Management.Automation.dll + + + + + + + + + + + + + + + Designer + + + + Designer + + + + + + + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file diff --git a/CortanaConfigurator/CortanaConfigurator.user b/CortanaConfigurator/CortanaConfigurator.user new file mode 100644 index 0000000..7937b01 --- /dev/null +++ b/CortanaConfigurator/CortanaConfigurator.user @@ -0,0 +1,13 @@ + + + + publish\ + + + + + + en-US + false + + \ No newline at end of file diff --git a/CortanaConfigurator/Program.cs b/CortanaConfigurator/Program.cs new file mode 100644 index 0000000..0cb2c49 --- /dev/null +++ b/CortanaConfigurator/Program.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Management.Automation; +using System.Collections.ObjectModel; + +namespace ConsoleApp1 +{ + class Program + { + + static void Main(string[] args) + { + + Console.WriteLine("Cortana Enabler/Disabler! Written by Dalton Smith"); + Console.WriteLine("Guarenteed working as of Windows 10 OS Build 17763.55"); + Console.WriteLine("============================================="); + Console.WriteLine(); + Console.Write("Type Enable(1) or Disable(2) Cortana? "); + + if (!int.TryParse(Console.ReadLine(), out int option)) + { + option = 0; + } +; + String enabled = ""; + + if (option == 1) + { + enabled = "Set-ItemProperty -Path $path -Name \"AllowCortana\" -Value 1"; + + } else if (option == 2) + { + enabled = "Set-ItemProperty -Path $path -Name \"AllowCortana\" -Value 0"; + + } else if (option == 0) + { + Console.WriteLine("Your input was invalid"); + } + + Console.WriteLine(); + + if (enabled != "") + { + //create powershell instance + PowerShell powerInstance = PowerShell.Create(); + powerInstance.AddScript("New-Item -Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\" -Name \"Windows Search\""); + + powerInstance.AddScript("$path = \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search\""); + powerInstance.AddScript(enabled); + powerInstance.AddScript("Stop-Process -name explorer"); + powerInstance.Invoke(); + if (option == 1) + { + Console.WriteLine("Enabled Cortana"); + } + else + { + Console.WriteLine("Disabled Cortana"); + } + + } + else + { + Console.WriteLine("There was an error, please restart the application"); + Console.Read(); + } + + if (option == 2) + { + Console.WriteLine(); + Console.WriteLine("============================================="); + Console.WriteLine("Would you also like to uninstall the Cortana Process?"); + Console.WriteLine("Please note that this is not possible on later Windows versions"); + Console.WriteLine("Uninstalling Cortana Process will also disable Windows Search"); + Console.Write("Uninstall y/n? "); + String uninstall = Console.ReadLine(); + + if (uninstall == "y") + { + PowerShell powerInstance = PowerShell.Create(); + powerInstance.AddScript("Get-AppxPackage | Where-Object {$_.Name -eq ‘Microsoft.Windows.Cortana’} | Select-String “Cortana”"); + var results = powerInstance.Invoke(); + + StringBuilder stringBuilder = new StringBuilder(); + + + foreach (PSObject obj in results) + { + stringBuilder.AppendLine(obj.ToString()); + } + + String delete = stringBuilder.ToString(); + powerInstance.AddScript("Remove-AppxPackage " + delete); + powerInstance.Invoke(); + Console.WriteLine("Uninstalled Cortana"); + } + else + { + //do nothing + } + + } + + Console.WriteLine(); + Console.WriteLine("You may now close the program"); + Console.Read(); + + } + + } +} diff --git a/CortanaConfigurator/Properties/AssemblyInfo.cs b/CortanaConfigurator/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0936c02 --- /dev/null +++ b/CortanaConfigurator/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("Cortana Configurator")] +[assembly: AssemblyDescription("Uses the power of Powershell and C# to bitch slap Cortana into submission")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Dalton Smith")] +[assembly: AssemblyProduct("Cortana Configurator")] +[assembly: AssemblyCopyright("Copyright Dalton Smith - 2018")] +[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("ef9b9046-0e92-41b1-a263-0d2d748c03a1")] + +// 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/CortanaConfigurator/Properties/app.manifest b/CortanaConfigurator/Properties/app.manifest new file mode 100644 index 0000000..e517a87 --- /dev/null +++ b/CortanaConfigurator/Properties/app.manifest @@ -0,0 +1,70 @@ + + + + + + + + s + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CortanaConfigurator/cortana_icon_3YL_icon.ico b/CortanaConfigurator/cortana_icon_3YL_icon.ico new file mode 100644 index 0000000..38cbe21 Binary files /dev/null and b/CortanaConfigurator/cortana_icon_3YL_icon.ico differ diff --git a/CortanaConfigurator/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache b/CortanaConfigurator/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4eefcd7 --- /dev/null +++ b/CortanaConfigurator/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +3c3ca03f307ad3380e54a8a35d80d5be0b530f63 diff --git a/CortanaConfigurator/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt b/CortanaConfigurator/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e8ae8f8 --- /dev/null +++ b/CortanaConfigurator/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csprojAssemblyReference.cache +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe +C:\Users\daltz\source\repos\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb diff --git a/CortanaConfigurator/obj/Debug/ConsoleApp1.csprojAssemblyReference.cache b/CortanaConfigurator/obj/Debug/ConsoleApp1.csprojAssemblyReference.cache new file mode 100644 index 0000000..cb65240 Binary files /dev/null and b/CortanaConfigurator/obj/Debug/ConsoleApp1.csprojAssemblyReference.cache differ diff --git a/CortanaConfigurator/obj/Debug/ConsoleApp1.exe b/CortanaConfigurator/obj/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..5074c80 Binary files /dev/null and b/CortanaConfigurator/obj/Debug/ConsoleApp1.exe differ diff --git a/CortanaConfigurator/obj/Debug/ConsoleApp1.pdb b/CortanaConfigurator/obj/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..86f674f Binary files /dev/null and b/CortanaConfigurator/obj/Debug/ConsoleApp1.pdb differ diff --git a/CortanaConfigurator/obj/Debug/CortanaConfigurator.csproj.CoreCompileInputs.cache b/CortanaConfigurator/obj/Debug/CortanaConfigurator.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..d589487 --- /dev/null +++ b/CortanaConfigurator/obj/Debug/CortanaConfigurator.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +d40fcfc2e7357130e19f21dcdc12cfd87b9ab48f diff --git a/CortanaConfigurator/obj/Debug/CortanaConfigurator.csprojAssemblyReference.cache b/CortanaConfigurator/obj/Debug/CortanaConfigurator.csprojAssemblyReference.cache new file mode 100644 index 0000000..265bba0 Binary files /dev/null and b/CortanaConfigurator/obj/Debug/CortanaConfigurator.csprojAssemblyReference.cache differ diff --git a/CortanaConfigurator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CortanaConfigurator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..46623ef Binary files /dev/null and b/CortanaConfigurator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/CortanaConfigurator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/CortanaConfigurator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/CortanaConfigurator/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/CortanaConfigurator/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/obj/Release/ConsoleApp1.csproj.CoreCompileInputs.cache b/CortanaConfigurator/obj/Release/ConsoleApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4eefcd7 --- /dev/null +++ b/CortanaConfigurator/obj/Release/ConsoleApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +3c3ca03f307ad3380e54a8a35d80d5be0b530f63 diff --git a/CortanaConfigurator/obj/Release/DesignTimeResolveAssemblyReferences.cache b/CortanaConfigurator/obj/Release/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..989bb06 Binary files /dev/null and b/CortanaConfigurator/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/CortanaConfigurator/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/CortanaConfigurator/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..42530fd Binary files /dev/null and b/CortanaConfigurator/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/CortanaConfigurator/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/CortanaConfigurator/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/CortanaConfigurator/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/CortanaConfigurator/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/CortanaConfigurator/packages.config b/CortanaConfigurator/packages.config new file mode 100644 index 0000000..76eb1aa --- /dev/null +++ b/CortanaConfigurator/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/System.Management.Automation.dll.10.0.10586.0/.signature.p7s b/packages/System.Management.Automation.dll.10.0.10586.0/.signature.p7s new file mode 100644 index 0000000..30fd1a0 Binary files /dev/null and b/packages/System.Management.Automation.dll.10.0.10586.0/.signature.p7s differ diff --git a/packages/System.Management.Automation.dll.10.0.10586.0/System.Management.Automation.dll.10.0.10586.0.nupkg b/packages/System.Management.Automation.dll.10.0.10586.0/System.Management.Automation.dll.10.0.10586.0.nupkg new file mode 100644 index 0000000..6b7c58b Binary files /dev/null and b/packages/System.Management.Automation.dll.10.0.10586.0/System.Management.Automation.dll.10.0.10586.0.nupkg differ diff --git a/packages/System.Management.Automation.dll.10.0.10586.0/lib/net40/System.Management.Automation.dll b/packages/System.Management.Automation.dll.10.0.10586.0/lib/net40/System.Management.Automation.dll new file mode 100644 index 0000000..b6e5f94 Binary files /dev/null and b/packages/System.Management.Automation.dll.10.0.10586.0/lib/net40/System.Management.Automation.dll differ