SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    357
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    run uft from command with parameters

    This code runs uft - how to include parameters? - got my uft script expecting it...


    Option Explicit
    Dim StrCmd,Path
    Path = "C:\Program Files (x86)\HP\Unified Functional Testing\bin"
    StrCmd = "CD /D "& Path & "& Start mdrv.exe -usr "& DblQuote("C:\Unified Functional Testing\UFTSW\UFTSW.usr") &""
    Call Run(StrCmd,1,False) 'Showing the console
    Call Run(StrCmd,0,False) 'Hiding the console
    '************************************************* *********************************************
    Function Run(StrCmd,Console,bWaitOnReturn)
    Dim ws,MyCmd,Result
    Set ws = CreateObject("wscript.Shell")
    'A value of 0 to hide the MS-DOS console
    If Console = 0 Then
    MyCmd = "CMD /C " & StrCmd & ""
    Result = ws.run(MyCmd,Console,bWaitOnReturn)
    If Result = 0 Then
    'MsgBox "Success"
    Else
    MsgBox "An unknown error has occurred!",16,"An unknown error has occurred!"
    End If
    End If
    'A value of 1 to show the MS-DOS console
    If Console = 1 Then
    MyCmd = "CMD /K " & StrCmd & ""
    Result = ws.run(MyCmd,Console,bWaitOnReturn)
    If Result = 0 Then
    'MsgBox "Success"
    Else
    MsgBox "An unknown error has occurred!",16,"An unknown error has occurred!"
    End If
    End If
    Run = Result
    End Function
    '************************************************* *********************************************
    Function DblQuote(Str)
    DblQuote = Chr(34) & Str & Chr(34)
    End Function
    '************************************************* *********************************************
    Last edited by jloyzaga; 09-26-2016 at 10:44 PM. Reason: improve the post

  2. #2
    Member
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    357
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Can anyone figure it out?

    Thanks
    Joe

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.64%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:07 PM.

Copyright BetaSoft Inc.