in reply to \" on the WinXP Command Line
This will let you get at the command line without it being messed with.
#! perl -slw use strict; use Win32::API::Prototype; ApiLink( 'kernel32', 'PVOID GetCommandLine(void)' ); my $cmdline = GetCommandLine( 0 ); my( $exe, $switches, $script, $params ) = $cmdline =~ m[(\S+)\s+(-\S+)?\s+"([^"]+)"\s*(.*$)]; print "Script params: '$params'"; __END__ P:\test>331797 "A A" B Script params: '"A A" B' P:\test>331797 "A A\" B Script params: '"A A\" B'
|
|---|