Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: system("start ...") has 30 secs delay

by bofh_of_oz (Hermit)
on Jul 08, 2005 at 13:09 UTC ( #473401=note: print w/replies, xml ) Need Help??

in reply to system("start ...") has 30 secs delay

You can try to see whether it is a browser problem or Perl/something else, by using Notepad to open the file:

system("c:\\windows\\system32\\notepad.exe file.html");
and timing that, then comparing to the time with "start"...

An idea is not responsible for the people who believe in it...

Replies are listed 'Best First'.
Re^2: system("start ...") has 30 secs delay
by yike (Novice) on Jul 08, 2005 at 14:38 UTC
    I think this idea brings us closer to the problem.
    If I do:
    system("start /b c:\\WINNT\\system32\\notepad.exe $File");
    then notepad opens the file immediately.
    If I use 'system("start /b $File");', then it takes 30 seconds before it even 'starts to open'.
    Does this mean that there is a problem with the fileextention association or with the path?
    Why is it working from the cmd prompt then?

      Firstly, I didn't actually mean to use "start" to start Notepad... just do it directly so that no other system programs are involved - less variables in the equation.

      Second, now you can try this:

      system("c:\\program files\\internet explorer\\iexplore.exe $File");
      (note no "start" command here)

      If you still have 30-sec delay, then the problem is in Perl starting IE. You can try starting a different browser to check it further. If not... just use it that way as it will mean that the system uses these 30 seconds to find the application that should be used with this extension.

      An idea is not responsible for the people who believe in it...

        Your new suggestion also works fine. No delay ...
        But the whole idea is that I don't want to put a link to the program which must execute the file.
        It can be different for every user.
        Not using any 'program link' is very attractive for me because the file can have every kind of extention and it is up to the user of the program to decide to which program he/she associates certain file extention.
        So I appreciate your help very much but I would like to know why 'system("file.html")' takes !!!exactly!!! 30 seconds to start and why 'system("c:\\program files\\internet explorer\\iexplore.exe File.html")' starts up immediately.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://473401]
[choroba]: The issue created

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-04-27 09:22 GMT
Find Nodes?
    Voting Booth?