troubleshooting Question

In Windows 10, how do I open a command prompt at a folder with specified foreground and background colors?

Avatar of rkulp
rkulpFlag for United States of America asked on
Windows OS
14 Comments1 Solution234 ViewsLast Modified:
In Windows 7 I used the registry to be able to open a command prompt window rooted at a folder using the method given by Honeycutt in Microsoft Windows XP Registry Guide on page 98.  The procedure is as follows:

  1. In HKCR\Directory\shell, create the subkey cmdhere
  2. In HKCR\Directory\shell\cmdhere, set the default value to CMD Prompt Here
  3. In HKCR\Directory\shell\cmdhere, create the subkey command
  4. In HKCR\Directory\shell\cmdhere\command, set the default value to C:\Windows\Sustem32\cmd.exe /k cd "%1"

This is repeated in HKCR\Drive. The result is a menu item "CMD Prompt Here" which appears when right clicking a folder. Clicking the menu item opens the command prompt window.

In Windows 10 this opens the window but with the error: "The system cannot find the path specified." and the window opens int the C:\Windows\System32 directory.

I would like to know how to correct this and to use the /t:fg parameter to set the foreground and background colors. (See https://technet.microsoft.com/en-us/library/bb490880.aspx. ) Using the run capability on the start menu, I have tried every permutation of cmd.exe /k cd "D:\"  /t:fg that I can think of (replacing f and g with the correct numbers, including the cd in the quotes, etc.) and always get the same result. Help would be greatly appreciated.
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros