It appears that a cgi app (in C, VS C++) does not inherit the COMSPEC environmental variable.
When adding the variable to the application:
_putenv( "COMSPEC=C:\\WINDOWS\\system32\\cmd.exe" );
// C4996
the cgi application no longer executes from the browser but is interpreted as a file for download. (i.e. - Save this file?)
My question is why does adding this variable to the cgi app change the way it excutes (or no longer does)
I have access the the web server code but not sure what to change.
EDIT
Used C开发者_C百科reateProcess() and got the same result: the cgi application no longer executes from the browser but is interpreted as a file for download. (i.e. - Save this file?)Any help is appreciated. Thanks.
精彩评论