Last active
March 20, 2018 18:21
-
-
Save JavierJF/e453bf81ace0d6e0c2cda342d14b87b3 to your computer and use it in GitHub Desktop.
Bug: Simple solution for setting the StartMenu layout using C# and PowerShell
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
var dotNetStartMenuSetter = edge.func({ | |
source: path.join(__dirname, "dotnet/StartMenuSetter.csx"), | |
references: ["C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\WindowsPowerShell\\3.0\\System.Management.Automation.dll"] | |
}); | |
gpii.windows.startMenuLayout.exportLayout = function () { | |
var promise = fluid.promise(); | |
var result = dotNetStartMenuSetter("", true); | |
if (result === undefined) { | |
promise.reject({ | |
isError: true, | |
message: "Undefined error" | |
}); | |
} else if (result[0] === "Success") { | |
promise.resolve(); | |
} else { | |
promise.reject({ | |
isError: true, | |
message: result[1] | |
}); | |
} | |
return promise; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment