in reply to Running a Shell Program from CGI page

Let me know if you see any scope of enhancement

Let's suppose for a moment that this script is called with a value for the App_name parameter of ';rm -rf ~', what do you suppose would happen? That would be bad enough but who knows what other access you are opening up to the potential miscreants. There's no point going into great detail here about how to fix this since there are thousands of tutorials on the web (not least the section "Don't Let User Data Near the Shell" from Ovid's CGI course which you would do well to read). But, if this is an actual CGI script on an actual webserver, take it down right now before it lets all the hordes of bad guys in.

Other things which could use attention:

If you can correct all of these concerns there is every chance that you will have solved your original problem as a consequence. Good luck.