Micro Focus QTP (UFT) Forums
Call an .exe via QTP10 scripts - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Call an .exe via QTP10 scripts (/Thread-Call-an-exe-via-QTP10-scripts)



Call an .exe via QTP10 scripts - rashmsrit - 01-12-2011

Hi,

How can we call .exe file using QTP10 scripts

Thanks in advance



RE: Call an .exe via QTP10 scripts - manishbhalshankar - 01-12-2011

Hi Rashmsrit,
Try:
Code:
SystemUtil.Run("filePath\name.exe")



RE: Call an .exe via QTP10 scripts - UFTEnthusiast - 01-12-2011

In most situations, you should use a SystemUtil.Run statement to run applications or to open files in their default application. For more information on the SystemUtil.Run statement, refer to the Standard Windows section of the QuickTest Professional Object Model Reference.
The InvokeApplication statement is supported primarily for backward compatibility ( From QTP Help)

The following example uses the InvokeApplication function to open Internet Explorer.

InvokeApplication "E:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE"

Thanks,


RE: Call an .exe via QTP10 scripts - rashmsrit - 01-20-2011

Hi Manish,
Thanks a lot