Micro Focus QTP (UFT) Forums
diff between invoke application and systemutil.run - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: diff between invoke application and systemutil.run (/Thread-diff-between-invoke-application-and-systemutil-run)



diff between invoke application and systemutil.run - balatester - 09-29-2010

can anyone tell me the diff between invoke application and systemutil.run?


RE: diff between invoke application and systemutil.run - KavitaPriyaCR - 10-01-2010

invoke application:
Invokes an executable application.
Syntax:InvokeApplication(Command [,StartIn])

systemutil.run:
Is an object used to control applications and processes during a run session.
It is used to run a file or application. This can be used to run non executable application, when specifying a non-executable file, the file opens in the associated application.
Ex: SystemUtil.Run "C:\type.txt", "", "", ""


RE: diff between invoke application and systemutil.run - cdesserich - 10-01-2010

Since SystemUtil.Run does everything InvokeApplication does and more, you're supposed to use SystemUtil.Run. From the QTP help file:

QTP Help File Wrote:Note: 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.