// inherit only when we need to pipe the streams
_startupInfo.write();
WString cmd = new WString(_cmd);
WString wDir = getWorkingDir() == null ? null : new WString(getWorkingDir());
String stdUser = standardizeUser(_user);
StringBlock environment = null;
WString[] env = null;
if (_environment.size() != 0)
{
env = new WString[_environment.size()];
int i = 0;
for (String[] entry : _environment)
{
env[i++] = new WString(entry[0] + "=" + entry[1]);
}
environment = new StringBlock(env);
}
if (_desktop != null)
{
_startupInfo.lpDesktop = new WString(_desktop);
log("setting desktop "+_desktop);