Why does windows spawn process sometimes trigger error STATUS_SXS_ASSEMBLY_NOT_FOUND?
See the question and my original answer on StackOverflowAs specified here _spawn, _wspawn Functions, only the functions with a 'p' letter in the name implicitely use the PATH environment variable. The others don't.
So you need to do this:
char *args[] = {"notepad.exe", NULL };
_spawnvpe(_P_NOWAIT, args[0], args, NULL);