SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Getting error in running dos command from QTP

    Hi,

    I am not able to execute a dos command from QTp . I have tried the help and search option . but not of any help. i am able to change the directory but while runing a specified command it is giving an error

    the command to be run

    c:\base> script\run.bat -c process\ReviewComplete.properties

    how do i can achieve this

    currently i am doing.

    Dim oShell
    Set oShell = CreateObject ("WSCript.shell")
    oShell.run "cmd /K C:\base\script\run.bat -c process ReviewComplete.properties"
    Set oShell = Nothing


    thanks in advance

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    Should not it be?

    oShell.run "cmd /K C:\base\script\run.bat -c C:\based\process\ReviewComplete.properties"

  3. #3
    Member
    Join Date
    Nov 2007
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    i have tried ur command but still it gives the error of som Java_options, when i run the coomand i listed manually its working fine..

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    put this command in another batch file and run that from some folder. If the new batch file works then call that batch file using oShell.run

  5. #5
    Member
    Join Date
    Nov 2007
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    acually i wann to see the steps so cannot execute in batch file... Is there any way that we can run multiple commands.

    firstly i execute this command

    cd base
    and then execute this.

    script/run.bat -c process/a.properties

    divide the command in two parts may it work.

  6. #6
    Senior Member
    Join Date
    Dec 2006
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    Provide & between the commands
    ex: to run the commands 1)CD C:\ 2) Help

    oShell.run "cmd /K CD C:\ & Help"

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    I am not sure why you don't want to use Batch file? When you use a batch file you will still see the commands being executed.

  8. #8
    Member
    Join Date
    Nov 2007
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting error in running dos command from QTP

    i will try runing batch file then see waht error comes

 

 

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 © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:31 AM.

Copyright BetaSoft Inc.