How should I quote following command to get desired output -
cmd.exe /c "C:\Remote\Remote.exe -u somedomain\Administrator -p i4D4KuHb0KTcpXObqf49ZbopthoFkC+yUYbkY6srPJ4= -util "C:\Program Files\V\Nt\bin\spprt\u.exe" -output winmas02_2018-12-18__12-23-37 -odir "C:\Program Files\Vx\NB\bin\spprt\winmas02_2018-12-18__12-23-37""
Here Remote.exe
is C#.NET command application. -u -p -output -odir
are getting passed to this (Remote.exe) correctly. Remote.exe
is responsible to start u.exe
under the impersonated context of give user credentials. I am using .net's Process and ProcessStartInfo classes here.u.exe
is legacy non .net application
The current behavior -
Remote.exe
is successfully launching u.exe
however the quoted path passed to -odir
parameter for u.exe
is not working. 'u.exe' is failing because the path passed to -odir
parameter is breaking at "C:\Program "
Any pointer on how to handle this?