--- In [email protected], "aviasd" <[EMAIL PROTECTED]> wrote:

> sorry - small regex fix : 
> 
> local commandline= ;;+
> regex.pcrereplace(?"^CommandLine|\x20*\R\x20*|\x20+$",res,"")
> local rescmd=regex.m1(commandline, ?"(?i)^(.+?\x22?) ", "\\1")
> local resparams= regex.m1(commandline, ?"(?i)^.+?\x22? +(.+)", "\\1")
>

Not sure what was failing with my patterns (will check if you post
debug output), but the above resparams is including everything from
the first empty space on.

e.g.,

commandline used:
"C:\Program Files\NoteTab Light\NoteTab.exe"  /L="Custom ClipKeys:Test
Clipkeys"

resparams is:Files\[...etc...]Clipkeys"

I am finding that regardless of how I actually enter the command,
wmic's "Get" has the path, ".exe" (or ".EXE") and surrounding quotes
around the app portion of the command line. So maybe there's no need
to allow for no quotations.

Regards,
Sheri

Reply via email to