From: David Vallner Date: 2006-08-17T06:01:36+09:00 Subject: Re: Command line arguments in windows On Wed, 16 Aug 2006 22:50:03 +0200, Joe Seeley wrote: > If I execute my apps from a command line using a syntax like this > > ruby my_app arg1 arg2 .. argx > > then all passed in arguments are handled correctly. > > If I execute my apps from a command line using this syntax > > my_app arg1 arg2 .. argx > > then ARGV is empty! > > .rb exists in my PATHEXT system variable so it should be treated the > same as > a .exe. Anyone else encountered this? > > Thanks, > Joe Not really. PATHEXT just means that try to append those extensions to a command you enter on the command line, and then invoke the default opener for that file type. The opener for ruby could be set up to run "ruby %1", where %1 is only the script file name. I don't have a Ruby installed on my Windows boot right now, but poke around the registry looking for what filetype the ".rb" extension is registered to, and then search for the name of the filetype to scrounge up what the command string is. My memory of last doing something like this is a little vague, so no exact syntax - but I do think the filetype opener settings use batch file syntax, and then you should use %* in place of % to see if it helps. David Vallner