> > exec("C:\\Program Files\\Anything\\Foo.exe"); > > Works just fine for me without the semicolon. Works just fine with one too. Try to stay on topic. > I might not be understanding your situation, but on my windows system, > this works fine... > > irb> s = "c:\\program files\\adobe\\acrobat 7.0\\reader\\acrord32.exe" > => "c:\\program files\\adobe\\acrobat 7.0\\reader\\acrord32.exe" > irb> `#{s}` > => "" > > exec s also works but the irb process closes after that. This works, but either Ruby or Windows is doing some magic here that could be dangerous. Consider this: system("C:/Program Files/Internet Explorer/IEXPLORE.exe") According to Ruby, that is passed to the shell for interpretation. But if you type the same string in to cmd.exe, you can't run internet explorer. This means that somewhere along the line, someone is checking to see which part of the string is the program, regardless of the spaces. I''m not sure who is doing the parsing (I'd have to check the Ruby source and then the MSDN docs for the Windows API being called) but regardless, this isn't the right answer. Consider this logical next step: system("C:/Program Files/Internet Explorer/IEXPLORE.exe http://www.ruby-lang.org") How does the system know that the program ends at IEXPLORE.exe and the arguments start at the next space? Someone is "checking" that each space may or may not designate a program. Still not convinced that this is hoakey and possibly dangerous? Then copy Notepad.exe to C:\Program Files\Internet.exe and re-run the same code again: system("C:/Program Files/Internet Explorer/IEXPLORE.exe http://www.ruby-lang.org") See how the behavior changed based on which part of the space- separated path existed as a program? Now that "C:/Program Files/ Internet" is executable, it is run instead. When the files on the system designate which executable is going to be launched, there is a problem. This is a dangerous way to program. The correct solution (given by Nobuyoshi) is this: cmd = "C:/Program Files/Internet Explorer/IEXPLORE.exe" system([cmd, cmd], "http://www.google.com") This avoids the sub-shell mess all together, regardless of whether "C:/ Program Files/Internet" is executable. -JJ