Results 1 to 7 of 7

Thread: Is this expected behavior for command line arguments

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Is this expected behavior for command line arguments

    Take a look at the attached screen captures. Is this expected behavior
    for install command line arguments?

    /ConfigDir=c:\yada1\yada2\yada3 FAILS

    /ConfigDir="c:\yada1\yada2\yada3" WORKS


    --
    Lee White

    RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
    Report Faxing.....: http://www.cwaddons.com/products/afe/
    ---Enroll Today---: http://CWaddons.com

    Creative Reporting: http://www.CreativeReporting.com

    Product Release & Update Notices
    http://twitter.com/DeveloperPLUS
    Attached Images Attached Images    

  2. #2

    Default Re: Is this expected behavior for command line arguments

    Hi Lee,

    > Take a look at the attached screen captures. Is this expected behavior
    > for install command line arguments?
    >
    > /ConfigDir=c:\yada1\yada2\yada3 FAILS
    >
    > /ConfigDir="c:\yada1\yada2\yada3" WORKS

    Good question. The installer uses the standard Microsoft VC++ GetArgC and
    GetArgV functions to process the command line. [there seems to be a
    difference between parameter parsing "prior to 2008" and "post 2008"
    libraries]. As far as I can see, you have to put double-quotes around the
    "values". A string surrounded by double quotation marks ("string") is
    interpreted as a single argument, regardless of white space contained
    within.

    I'll re-check this tomorrow.

    Friedrich

  3. #3

    Default Re: Is this expected behavior for command line arguments

    Friedrich,

    > I'll re-check this tomorrow.

    The reason I asked is that /ConfigDir=C:\yada\yada works for a
    shortcut running Clarion and could be what a developer passes in the
    command line of a 3rd party install. I don't use quotes in my
    shortcuts for Clarion so mine would fail.

    And I fully agree that values with spaces do require quotes.

    I can add script to parse the results for the lack of " but wanted to
    run it by you first.

    Lee White
    Attached Images Attached Images  

  4. #4

    Default Re: Is this expected behavior for command line arguments

    Hi Lee,

    > The reason I asked is that /ConfigDir=C:\yada\yada works for a
    > shortcut running Clarion and could be what a developer passes
    > in the command line of a 3rd party install. I don't use quotes
    > in my shortcuts for Clarion so mine would fail.
    >
    > And I fully agree that values with spaces do require quotes.
    >
    > I can add script to parse the results for the lack of " but
    > wanted to run it by you first.

    Still looking for a solution (e.g. replace the standard parameter parsing
    with my own code).

    Friedrich

  5. #5

    Default Re: Is this expected behavior for command line arguments

    Friedrich,

    > > I can add script to parse the results for the lack of " but
    > > wanted to run it by you first.
    >
    > Still looking for a solution (e.g. replace the standard parameter parsing
    > with my own code).

    It might be easier, and safer<g>, to simply look for the ". Such as
    testing for /ConfigDir=" in the command line using script instead of
    changing your runtime which is working.

    What say you?<g>

    --
    Lee White

    RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
    Report Faxing.....: http://www.cwaddons.com/products/afe/
    ---Enroll Today---: http://CWaddons.com

    Creative Reporting: http://www.CreativeReporting.com

    Product Release & Update Notices
    http://twitter.com/DeveloperPLUS

  6. #6

    Default Re: Is this expected behavior for command line arguments

    Hi Lee,

    > It might be easier, and safer<g>, to simply look for the ". Such as
    > testing for /ConfigDir=" in the command line using script instead of
    > changing your runtime which is working.
    >
    > What say you?<g>

    If that works for you, then yes do it <bg>

    But I still think that you have a valid point here.

    Friedrich

  7. #7

    Default Re: Is this expected behavior for command line arguments

    Friedrich,

    > > It might be easier, and safer<g>, to simply look for the ". Such as
    > > testing for /ConfigDir=" in the command line using script instead of
    > > changing your runtime which is working.
    >
    > If that works for you, then yes do it <bg>

    It does, and I will!<g>

    > But I still think that you have a valid point here.

    You have other things to clutter your mind with and, honestly, I doubt
    any Clarion developer goes to the trouble of running a 3rd party
    install with command line arguments... it's complicated!<g>

    I still believe ConfigDir should be a Clarion install option handled
    during the install process and written to the registry. That would
    make things SO MUCH EASIER and is easily doable. Or, since the install
    no longer defaults to "Program Files", just write the dang thing into
    the \bin\settings folder and be done with it. If the developer
    installs into "Program Files" they'll need admin rights to run the
    program so they'll already have write permissions to that folder, or
    have I not had enough coffee yet?!<g>

    --
    Lee White

    RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
    Report Faxing.....: http://www.cwaddons.com/products/afe/
    ---Enroll Today---: http://CWaddons.com

    Creative Reporting: http://www.CreativeReporting.com

    Product Release & Update Notices
    http://twitter.com/DeveloperPLUS

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •