Forum Discussion

james_hayhurst's avatar
james_hayhurst
New Contributor
12 years ago

Command line /cl option and spaces

Having some trouble with running AQtime from the command line.



I need to specify some command line options to the program I am going to profile. In order to do this the documetion says I should use the /cl:"[options]" flag.



This works fine except for when I try to pass options with spaces. The documentation says that if you wish to pass options with spaces then you should suround them with single quote characters. When I do this and run AQtime the program to be profiled still has the single quote characters in its command line I was expecing AQTime to replace the single quotes with double quotes.



I guess I'm doing something wrong as can't find any other complaints about this. Can anyone point me in the right direction



My command line to AQTime is: 



"C:\Program Files (x86)\SmartBear\AQtime 7\Bin\AQtime.exe" "D:\AQ_V.aqt" /SilentMode /e /sr:"case 10-1800-150.aqr" /cl:"'run=D:\SVN\newSmallCRs\shapesData\M\tests\V\10\case 10-1800-150.vbs' 'FEACWD=D:\SVN\newSmallCRs\shapesData\M\tests\V\10' 'SESSION=case 10-1800-150' LICNAM=[SENTINELLM,feasql,10569] INTERACT=NO SKIPSCRIPTS=YES 'CHECKOUTDIR=D:\SVN\newSmallCRs' 'SCRIPTS_INCLUDE=D:\SVN\newSmallCRs\code\scripts' 'EXAMPLES=D:\m\examples' 'QA_INCLUDE=D:\SVN\newSmallCRs\shapesData\m' QAOPTIONS=31742" /r



The command line to the executing program is:



"D:\SVN\NewSmallCrs\code\bin\Release_Win32\M.exe" 'run=D:\SVN\newSmallCRs\shapesData\M\tests\V\10\case 10-1800-150.vbs' 'FEACWD=D:\SVN\newSmallCRs\shapesData\M\tests\V\10' 'SESSION=case 10-1800-150' INTERACT=NO SKIPSCRIPTS=YES 'CHECKOUTDIR=D:\SVN\newSmallCRs' 'SCRIPTS_INCLUDE=D:\SVN\newSmallCRs\code\scripts' 'EXAMPLES=D:\m\examples' 'QA_INCLUDE=D:\SVN\newSmallCRs\shapesData\m' QAOPTIONS=31742



Cheers



James





  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi James,


     


    Will the following format work?


    /cl:"param1='value with a space' param2='value with a space'"


     

  • Hi Tanya




    I tried that format too unfortunately it doesn't work either. The single quotes still appear in the profiled programs command line.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi James,



    What if you try to double the inner single quotes? E.g.:

    /cl:'param1=''value with a space'' param2=''value with a space'''
  • Hi Alex 




    doubleing the inner single quotes? E.g.:


     


    /cl:'param1=''value with a space'' param2=''value with a space'''


     


    Did not work either the doubled single quotes appeared in the path of the program to be profiled.


     


    I also tried double quotes around the values with spaces and single quotes round the entire command line specifed by /cl: E.g:

     


    /cl:'param1="value with a space" param2="value with a space"'


     


    The double quotes were preserved but unfortunately so were the single quotes


     


    Do you have an example of using the cl option with parameteres that have spaces that does work?



  • Ok Alex thanks for the help



    There isn't a great deal of time pressure on this so I'll wait for Tanya, before sumitting a support ticket.





  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi James,


     


    I played with this command-line parameter. Here is what I've got:


    when passing the following parameter to AQtime: 


    "C:\Program Files (x86)\SmartBear\AQtime 7\Bin\AQtime.exe" "D:\AQ_V.aqt" /cl:"'run=a b c' run2=aa"


    I got the following input parameters:




    run=a b c


    run2=aa




     


    Is this what you want to get, but fail? Or, do you want to get the following input parameters?




    run="a b c"


    run2=aa