I need to check the QTP script's run mode with the piece of code and based on the run modes i need to save the screen captures to the appropriate path. So inorder to do this i need Vb Script to check the Scripts run mode.
Forgive the ignorance in which this question is posed....
What has QTP's run mode to do with the 'piece of code' or the AUT in general?
There is only 'Normal' 'Fast' and a script 'update' mode I know of. It sounds to me like you need to go back to 'whoever' and find out exactly what is needed for you to proceed with your script creation.
And you might want to read up on QTP Automation in online help. Using this feature you configure and then launch QTP and tests--thereby gaining the control and knowledge of how QTP is going to run, avoiding the need to somehow interogate QTP after it is launched interactively.
<font class="small">Code:</font><hr /><pre> Set App = CreateObject("QuickTest.Application") ' Create the Application object
Print App.Options.Run.RunMode 'Get the run mode status
App.Options.Run.RunMode = "Fast" ' OR "Normal" -> changing the RunMode
Set App = Nothing