Micro Focus QTP (UFT) Forums

Full Version: Executing EXE files in QTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

1 . I have an .exe file (.vbs converted ->.exe)
What should be the segment of code or command in order to execute the same in QTP?

2. And how to set Work Directory=Current Directory, Execution Type=Compile?

Can anyone help me out regarding these asap.
Thanks.
1) use systemutil.run "full path of exe "

2) Not sure what you mean by this. Please explain in detail.
Tried using SystemUtil.Run, but my problem is not solved.

For the next one,
It pops up an error message as Windows Script Host as dialog box name and with the following contents.
Script: C:\Docume~1\User Name\LOCALS~1\Temp\LibraryName.vbs
Line:9694
Char:2048
Error:Unterminated string constant
Code:800A0409
Source:Microsoft VBScript Compilation error

I removed Environment variables from the library and tried to execute thru' library. But the same problem (error message) persists only thing is the line no., character no. changes and in Error section it says Object required:'Environment'. Nothing else changes in the above dialog box.

I tried the same with the Utility file, it works fine when i add messagebox and execute thru' QTP.

I've no idea as to how to go about, is this a problem with the built .exe file from .vbs or is it some other problem?

Can u help me out?
Thanks.