开发者

How does the COMSPEC environmental variable effect a cgi executable?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜