Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Windows start /min

by ikegami (Pope)
on Apr 18, 2007 at 20:39 UTC ( #610839=note: print w/ replies, xml ) Need Help??


in reply to Windows start /min

I tried to reproduce your problem in Win2k with ActivePerl 5.6.1 and on WinXP with ActivePerl 5.6.0, 5.6.1, 5.8.0 and 5.8.8 using

perl -e "system('start /min notepad');"

but it worked fine every time. Could you provide more info, such as the code you are using?


Comment on Re: Windows start /min
Download Code
Re^2: Windows start /min
by Beechbone (Pilgrim) on Apr 19, 2007 at 10:21 UTC
    and
    $ perl -e 'system("cmd /c start /min notepad") and die $!;'
    works with Cygwin's Perl. (But note the required "cmd /c")

    Search, Ask, Know
      Hi,

      I am having trouble with the "start" command.

      Here is the contents of the PERL5SHELL environment variable:

      c:\>echo %PERL5SHELL% cmd.exe /c
      Calling the "dir" command works fine:
      c:\>perl -e "system(\"dir\")" Datenträger in Laufwerk C: ist SYSTEM Volumeseriennummer: CA02-1E1F Verzeichnis von c:\ 03.08.2012 14:24 <DIR> cygwin 09.10.2012 18:01 <DIR> Daten ... 10.10.2012 08:59 <DIR> Windows 2 Datei(en), 15.460 Bytes 15 Verzeichnis(se), 144.527.847.424 Bytes frei
      Calling "start dir" from Perl does not work:
      c:\>perl -e "system(\"start dir\")" start: dir: Das System kann die angegebene Datei nicht finden.
      Calling "start dir" directly opens a new window with the output from above:
      c:\>start dir
      Any idea what might cause this behaviour??

      Yours

      Markus

        Calling "start dir" directly opens a new window with the output from above:

        If you don't want a new window, use the /b option: start /b dir.

        But I suspect that your real problem is the one haven't described. Ie. Why are you using start, rather than running dir directly?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        RIP Neil Armstrong

        Any idea what might cause this behaviour??

        You have some kind of "start" program? You're loading a module which replaces system and looks for a start.exe?

        Maybe cmd.exe changed again, but I don't think so, look

        C:\>start blahblah The system cannot find the file blahblah. C:\>perl -e " system q/start blahblah/" The system cannot find the file blahblah.
        Notice it doesn't say "start: dir: The system cannot find the file blahblah."
        Calling "start dir" from Perl does not work:
        c:\>perl -e "system(\"start dir\")" start: dir: Das System kann die angegebene Datei nicht finden.
        dir is not a exe, it is a shell built in. start is also a shell built in. You will not find a start.exe in your C:\WINDOWS or any subfolder under that. Only cmd understands what dir is.

        try
        perl -e "system('cmd /c dir');"
        or
        perl -e "system('cmd /c start dir');"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://610839]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-08-31 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls