Micro Focus QTP (UFT) Forums
Doubts on Systemutil - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Doubts on Systemutil (/Thread-Doubts-on-Systemutil)



Doubts on Systemutil - bfakruddin - 12-22-2008

1. How to pass parameters to application while invoking application by using "Systemutil.run" method
systemutil.run (filename,[parameters],[path],[operation],[mode])



RE: Doubts on Systemutil - Ankur - 12-22-2008

I didnt understand. you want parameters to be passed to application or to systemutil.run ?


RE: Doubts on Systemutil - sreekanth chilam - 12-23-2008

Hi ,

Consider these below examples - it may give you a better perception:

Example 1:
Code:
SystemUtil.Run "C:\WINDOWS\system32\cmd.exe","","C:\","open"

Here "C:\WINDOWS\system32\cmd.exe" --> entire file path (Mandetory Parameter)
       "C:\" --> Working Directry ( Optional parameter )
       "open" --> mode ( Optional parameter )

Example 2:
Code:
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"

Example 3 :
Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","Y:\","open"
browser("..").Navigate("www.xyz.com")



RE: Doubts on Systemutil - bfakruddin - 12-24-2008

syntax: systemutil.Run file, [params], [dir], [op], [mode]

[params]: Optional. A String value.
If the specified file argument is an executable file, use the params argument to specify any parameters to be passed to the application.

I found this in QTP help, please explain this....! and tell how it works...?


RE: Doubts on Systemutil - bfakruddin - 12-24-2008

Thank you sreekanth,

Every thing is fine... but you left one blank after providing a path of .exe file "".....

I am asking about that [params].. in help they said that you can pass parameters to your executable file from here... How can we pass that parameters...?