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



Syntax of SystemUtil.Run - vijay.gupta - 08-09-2011

Hi,

I just want to understand the proper syntax of using this command.

Below is the syntax:

Code:
systemutil.run (filename,[parameters],[path],[operation],[mode])

Below is the example:

SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","","C:\Program Files\Internet Explorer","open"

Now, what I want to know is:


what parameter in the syntax corresponds to which value in example as I didn't got it and what may be the different values of parameters?

Also, it was very dissapointing for me to join this forum as I am not getting responses to my query and there are many queries pending.

I think that either moderators are not doing their work or are not assigned to this forum.


RE: Syntax of SystemUtil.Run - sshukla12 - 08-09-2011

If u want to run some executable file then it might be the case that u want to give some value as an input to the file. These inputs can be passed through [params] option.
For Example: SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","www.google.co.in"
I am running IE explorer.exe and passing the url that i want to open.

Correct me if wrong.

Regards,
Sankalp


RE: Syntax of SystemUtil.Run - vijay.gupta - 08-09-2011

Thanks sshukla,

Your example is perfect but I want to know the meaning of each parameter in below syntax:

systemutil.run (filename,[parameters],[path],[operation],[mode])

Now, in case of your example, what this "C:\Program Files\Internet Explorer\IEXPLORE.EXE" corresponds to in syntax?

Does it correspond to filename? If yes, then I understood "www.google.co.in" is a parameter in your example.

Now, what can be the values for path, operation and mode (I know that these are optional parameters)


RE: Syntax of SystemUtil.Run - sshukla12 - 08-09-2011

Find the attachment it might help you.

Regards,
Sankalp


RE: Syntax of SystemUtil.Run - vijay.gupta - 08-09-2011

Thanks sshukla,

So just want to confirm that:

filename is actually the path of the application you want to open, not just the name?
parameters is any parameter that can be required by invoking application. Can you please give me example of this?
path is default directory of file or application so just want to confirm that it corresponds to dir argument given in the document?
operation...i think it corresponds to op argument in docuument? if yes..then it is also not required.
mode is already given in document so it is not required


RE: Syntax of SystemUtil.Run - meeravenkat - 08-19-2012

I had difficulty trying to identify what each arguments were for... thanks for the explanation.


RE: Syntax of SystemUtil.Run - vinod123 - 08-21-2012

SystemUtil.Run "iexplorer","url of the application"