1

I have Tortoise Git, but it works much slower than calling "git status". I wrote the batch file:

cd /d %1
git status
pause
exit

According to this question How add context menu item to Windows Explorer for folders I try to add command as

C:\Windows\System32\cmd.exe /K "C:\BATs\ShowGitStatus.bat %1"

But I get the "The file does not have a program associated with it for performing this action. ..." What I'm doing wrong?

3
  • Batch file should be directly runnable. Why do you need the cmd /k? Commented Feb 21, 2018 at 7:12
  • Just to be sure, you name your batch file ShowGitStatus.bat in that folder? You tried running the command in cmd and it works? Commented Feb 21, 2018 at 7:13
  • I guess the "s in %1 messes up the existing ". Didn't try, so I can't be sure. Commented Feb 21, 2018 at 7:15

1 Answer 1

1
  1. Add new Computer\HKEY_CLASSES_ROOT\Directory\shell\GitStatus key in the registry
  2. Add new Computer\HKEY_CLASSES_ROOT\Directory\shell\GitStatus\Command key
  3. Change the default value of the last key to C:\BATs\ShowGitStatus.bat %1
  4. Place listed in question bat file tho the C:\BATs\ folder. Name it ShowGitStatus.bat

This should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.