Command prompt takes 7-8 seconds to load in Windows 7

7

2

When I go to Run and type cmd, it takes about 7-8 seconds for the command prompt to appear.

I have a Core i5 with 3GB of RAM running Windows 7 x86.

I really need the command prompt to run instantly because I use a lot of scripts to improve productivity. When the command prompt itself takes 7 seconds to load, the whole point is lost.

Does anyone have ideas as to what might be causing these delays?

Nandun

Posted 2012-07-25T15:03:14.313

Reputation: 323

1If your goal is efficiency, why not pin the command prompt to the taskbar and start it with Win+Number hotkeys or a single mouse click? – Der Hochstapler – 2012-07-28T13:58:06.683

As @OliverSalzburg suggested you is the best way but still we need little bit more information as this happens only when you launch the 'cmd' through Run command or the same problem when you launch it from the start menu? – avirk – 2012-07-28T14:04:16.033

thank you for the answers. My issue is that cmd takes a long time to load, whether i load it through Run, or even by double clicking on cmd.exe or even if i execute any batch file. are there any monitoring tools i can use to check what's going on under the hood when cmd loads? – Nandun – 2012-07-30T14:37:17.793

Answers

6

  1. Download Process Monitor.

  2. Filter the output such that you're only looking at a Process Name of conhost.exe or cmd.exe.

    enter image description here

  3. Add the Duration column to the output.

    enter image description here enter image description here

  4. Fire up a cmd.exe and see what's going on.

Simon Catlin

Posted 2012-07-25T15:03:14.313

Reputation: 76

Nice edit, Oliver! – Simon Catlin – 2012-07-28T21:48:41.750

/@Oliver Salzburg. Wow, thanks you so much for a great answer. I will try these out now. – Nandun – 2012-07-30T14:40:39.660

0

I think this is related to your home drive. If you open cmd.exe and by default it takes you to a mapped network drive, that could be the issue.

Basically, when I was connected via a VPN that didn't allow my on-site network mappings, cmd.exe would take a good ~10 seconds to open up.

user810816

Posted 2012-07-25T15:03:14.313

Reputation: 11

0

user810816 had the correct answer for me. On VPN, I had a lag of up to 50 seconds before CMD would even open.

On the start menu, right click to show file location, then right click again and edit the properties to "start in" a local drive, such as c:. The default variables resulted in a slow-to-access network location...

The load time is now almost instantaneous.

Benjamin

Posted 2012-07-25T15:03:14.313

Reputation: 123