Running DOS Commands QTP VB

Posted by rajivkumarnandvani on May 3, 2009

Running DOS Commands

You can run standard DOS commands in your QuickTest test or function using the VBScript Windows Scripting Host Shell object ( For example, you can open a DOS command window, change the path to C:\, and run the DIR command using the following statements:

Dim oShell

Set oShell = CreateObject (“”) “cmd /K CD C:\ & Dir”

Set oShell = Nothing


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: