Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

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


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


Comment on Re^3: system("start ...") has 30 secs delay
Download Code
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...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-12-27 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls