Jump to content

Recommended Posts

Posted

was looking at internet and found this to run via command line and wondered how to do it via autoit

C:pathbin>call mdrv.exe -usr "c:testtestFotMdrv.usr"

tried doing this and its come up with syntax errors (see attachment)

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Run (C:Program Files (x86)HPUnified Functional Testingbinmdrv.exe -usr , "C:pwcPWC-QTPPWC-QTP.usr")

post-47107-0-49969900-1410306517_thumb.j

  • Moderators
Posted

Try something like this:

$sPath = "C:\Program Files (x86)\HP\Unified Functional Testing\bin\mdrv.exe"
ShellExecute($sPath, ' -usr , "C:\pwc\PWC-QTP\PWC-QTP.usr"')
 If @error Then ConsoleWrite("Run failed with error: " & @error & @CRLF)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

  • Moderators
Posted

So that tells you that the first half of the ShellExecute (the path to the file) is correct. You have an error in the command line parameters. Is there supposed to be a space between -user and the comma? Can you verify the 'C:pwcpwc-qtppwc-qtp.usr' file exists?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

this is the code now

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$sPath = "C:Program Files (x86)HPUnified Functional Testingbinmdrv.exe"
ShellExecute($sPath, ' -usr "C:pwcPWC-QTPPWC-QTP.usr"')
 If @error Then ConsoleWrite("Run failed with error: " & @error & @CRLF)
 
seems to run it but nothing is started
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UsersJoe LoyzagaDesktopRun UFT.au3" /UserParams    
+>09:35:57 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:Program Files (x86)AutoIt3SciTE   UserDir => C:UsersJoe LoyzagaAppDataLocalAutoIt v3SciTEAutoIt3Wrapper   SCITE_USERHOME => C:UsersJoe LoyzagaAppDataLocalAutoIt v3SciTE 
>Running AU3Check (3.3.12.0)  from:C:Program Files (x86)AutoIt3  input:C:UsersJoe LoyzagaDesktopRun UFT.au3
+>09:36:02 AU3Check ended.rc:0
>Running:(3.3.12.0):C:Program Files (x86)AutoIt3autoit3.exe "C:UsersJoe LoyzagaDesktopRun UFT.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>09:36:03 AutoIt3.exe ended.rc:0
+>09:36:03 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 6.028
Posted

yes

this is the actual command I use on the windows command line

C:Program Files (x86)HPUnified Functional Testingbin>call mdrv.exe -usr "c:pwcPWC-QTPPWC-QTP.usr"

How can I run it via autoit then? use the Run function? keep getting the syntax wrong

  • Developers
Posted

Try

Shellexecute('C:Program Files (x86)HPUnified Functional Testingbinmdrv.exe','-usr "c:pwcPWC-QTPPWC-QTP.usr"','C:Program Files (x86)HPUnified Functional Testingbin')

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...