From: Daniel Martin Date: 2006-08-17T09:47:39+09:00 Subject: Re: Command line arguments in windows "Joe Seeley" writes: > 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? This isn't what I see: C:\Temp>type abu.rb p ARGV C:\Temp>abu what ever you want ["what", "ever", "you", "want"] Now, in the registry, the default value for HKEY_CLASSES_ROOT\.rb is "rbFile" and the default value for HKEY_CLASSES_ROOT\rbFile\Shell\open\command is: "c:\ruby\bin\ruby.exe" "%1" %* I suspect that your registry entry is missing the %* bit. Go open up regedit, find HKEY_CLASSES_ROOT\.rb, find that default value (probably rbFile, but if it isn't use that value where I say "rbFile"), then find the default on HKEY_CLASSES_ROOT\rbFile\Shell (probably "open"), then look at the default on HKEY_CLASSES_ROOT\rbFile\Shell\open\command and see if that includes the %* bit. If it doesn't, add it.