http://www.perlmonks.org?node_id=473431


in reply to Re^2: system("start ...") has 30 secs delay
in thread system("start ...") has 30 secs delay

Well...

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...

Replies are listed 'Best First'.
Re^4: system("start ...") has 30 secs delay
by yike (Novice) on Jul 08, 2005 at 15:09 UTC
    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.

      I can only say to that: try experimenting with different file extensions... and also google around (and maybe, look at Windows specs if you can find them)

      Here's an interesting idea:
      39) "Labtecgw" at iexbeta.com notes:
      Windows 2000 & XP machines delay as long as 30 seconds when you try to view shared files across a network because Windows is using the extra time to search the remote computer for any Scheduled Tasks. Here's how to prevent this remote search for Scheduled Tasks:
      Open up the Registry and go to :

      HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Current Version/Explorer/RemoteComputer/NameSpace

      Under that branch, select the key :
      {D6277990-4C6A-11CF-8D87-00AA0060F5BF}
      and delete it.

      If you like you may want to export the exact branch so that you can restore the key if necessary. This fix is so effective that it doesn't require a reboot and you can almost immediately determine yourself how much it speeds up your browsing processes.

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