Skip to content

embed and execute CMD command in c# app silently #115

Answered by Tyrrrz
Omar7saeed asked this question in Q&A
Discussion options

You must be logged in to vote

Why not just launch powershell directly? I.e.:

var result = await Cli.Wrap("powershell")
            .WithArguments(new[] {"-NoProfile", "-EncodedCommand", "VwByAGkAdAlAC0A..ETC"})
            .ExecuteBufferedAsync();

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Omar7saeed
Comment options

You must be logged in to vote
1 reply
@Tyrrrz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants