Announcement

Collapse
No announcement yet.

Command Line Arguments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command Line Arguments

    Hi,

    I am passing in a parameter when I call the EXE created by AutoPlay.
    I pass the parameter like this:

    LicenseInstaller.exe /lpgdir="c:\t\" - This is the directory where a file exists.

    In the On Startup function I set a local variable equal to the _CommandLineArgs.

    local strArgFound = "";
    strArgFound = _CommandLineArgs[1];

    When I display the strArgFound variable in a Dialog Message box it had this in it:

    /lpgdir=c:\t" SFXSOURCE:c:\t\LicenseInstaller.exe

    How do a get the /lpgdir=c:\t\ out of the variable? Why is showing the SFXSOURCE as well?

    Thanks,
    Kevin

  • #2
    If you enter the command line as /lpgdir="c:\t" it should work as expected. Or, you can add a trailing space, like in /lpgdir="c:\t\ ". If you finish the command line argument with a backslash, it will be interpreted as the start of an escape sequence, which isn't what you want.

    Ulrich

    Comment


    • #3
      Thank you Ulrich. That worked.

      When I pass in the parameter /lpgir="c:\t\ " and then parse out the c:\t\ and put that into a variable, the Folder.DoesExist returns false for that folder which does exist. Any ideas why?

      Thanks,
      Kevin

      Comment


      • #4
        Nevermind Ulrich. I figured out my issue. I needed to right trim the space off the string before concatenating with a file name.

        I am all set.

        Thank you,
        Kevin

        Comment

        Working...
        X