in reply to Re^2: Launch an exe using system
in thread Launch an exe using system

How would you handle that if you were typing start ..... on the command line? There are some Windows utilities that don't play nice with spaces in the path names, and for those you usually have to use quoting.

That being the case, you're not looking at a Perl problem, you're looking at a "I don't know how to use my operating system." problem. That's alright. But you should at least be aware where the issue is.

Try this (untested, but ...at least try it... ;)

system( qq/start "C:\\Program Files (x86)\\Microsoft LifeCam\\LifeCam.exe"/ );

Dave

Replies are listed 'Best First'.
Re^4: Launch an exe using system
by GrandFather (Saint) on Nov 14, 2011 at 09:07 UTC

    It's not so much the Windows utilities that can't handle the spaces (although that may be true), but the command line parsing that is performed by Window's equivalent of the "shell". The quoting is needed to have a command line argument that includes spaces be treated as a single argument rather than being broken into multiple arguments at the spaces. Exactly the same situation exists for *nix shells, although the quoting options are different. Oh, and various *nixen have their share of utilities that don't play well with paths containing spaces too. ;)

    True laziness is hard work