开发者

How does the COMSPEC environmental variable effect a cgi executable?

开发者 https://www.devze.com 2022-12-20 17:05 出处:网络
It appears that a cgi app (in C, VS C++) does not inherit the COMSPEC environmental variable. When adding the variable to the application:

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

精彩评论

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

关注公众号