I am having a small problem with nightly execution of my QTP scripts. I wrote a vbs script and put it in scheduled tasks which will run every night. Some times they are not running over night and the reason I observed is they are failing saying
"QTP has a unsaved document and cannot close it"
"QTP has a dialog box open, cannot close the dialog box"
I have solution to this, like I can just kill the QTP process before kicking off the QTP scripts. But just wondering is there any if an unsaved test is present in QTP, to save the test in a specified location via script.