Last active
April 23, 2024 19:11
-
-
Save JavierJF/4aaae48db4b1b13106344b06a5df6572 to your computer and use it in GitHub Desktop.
Setting StartMenu layout using C# - statically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* GPII Windows 10 Start Menu Layout Setter. | |
* | |
* Copyright 2018 Raising the Floor - International | |
* | |
* Licensed under the New BSD license. You may not use this file except in | |
* compliance with this License. | |
* | |
* The research leading to these results has received funding from the European Union's | |
* Seventh Framework Programme (FP7/2007-2013) | |
* under grant agreement no. 289016. | |
* | |
* You may obtain a copy of the License at | |
* https://github.com/GPII/universal/blob/master/LICENSE.txt | |
*/ | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Collections; | |
using System.Collections.ObjectModel; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Management.Automation; | |
using System.Management.Automation.Runspaces; | |
using Microsoft.Windows.StartLayout.Commands; | |
public class Startup { | |
static void Main(string[] args) { | |
IStartLayoutCmdlet startLayoutCmdlet = (IStartLayoutCmdlet) new CLSID_StartLayoutCmdlet(); | |
startLayoutCmdlet.ExportStartLayout("C:\\Users\\jaram\\Projects\\gpii\\windows\\gpii\\node_modules\\startMenuLayout\\dotnet\\layout.xml"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csc /r:"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\WindowsPowerShell\\3.0\\System.Management.Automation.dll" /r:"C:\\Windows\\WinSxS\\msil_microsoft.windows.startlayout.commands_31bf3856ad364e35_10.0.16299.15_none_f1ef98d10a079425\\Microsoft.Windows.StartLayout.Commands.dll" /debug .\StartMenuSetter-Native.csx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment