If its just a console app you can also use the CREATE_NO_WINDOW
flag as part of the CreateProcess
call itself, e.g.
CreateProcess(NULL, lpszCommandLine, NULL, NULL, FALSE,
CREATE_NO_WINDOW, NULL, NULL, &si, &pi);
Also, see this page for information about environment variables.