Convert portable msysGit to full installed equivalent (but still portable)

Being a fan of portable applications (even when working on my main workstation), I use the portable version of msysGit, however it does not set shells, environment variables, GUI settings, icons, etc. I would like to save my C:\ and installed applications in the original clean image provided by my employer so that whenever they provide a new Windows image, I do not need to reinstall all portable applications (including Git).

Is there any script that allows the portable version to simply β€œregister” with shell hooks (Git Bash here / Git GUI here) and icons (but not installed)?

To ask another way, if I install the full version, say D:\PortableApps\Git , will it be functionally equivalent to the portable version in terms of centralizing the entire file storage?

+4
source share
3 answers

Cut-paste the following files into the file (say, install.reg) and double-click on it.

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ Directory \ Shell \ git_gui] @ = "Git & GUI Here"

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ Directory \ Shell \ git_gui \ command] @ = "\" D: \ PortableApps \ Git \ bin \ wish.exe \ "\" D: \ PortableApps \ Git \ libexec \ git -core \ git -gui \ "\" - working-dir \ "\"% 1 \ ""

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ Directory \ Shell \ git_shell] @ = "Git Ba & sh Here"

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ Directory \ Shell \ git_shell \ commands] @ = "wscript \" D: \ PortableApps \ Git \ Git Bash.vbs \ "\"% 1 \ ""

Create a shortcut named Git Bash.lnk for the following purpose:

C: \ WINDOWS \ system32 \ cmd.exe / c "D: \ PortableApps \ Git \ Bin \ SH.exe" --login -i "

Your portable Git is now registered in the Windows shell.

+3
source

My MsysGit has been installed to the "f: \ git177" directory. so my githere.reg file on Windows 2003sp2:

 Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\git_gui] @="Git &GUI Here" [HKEY_CLASSES_ROOT\Directory\shell\git_gui\command] @="f:\\Git177\\bin\\wish.exe \"f:\\Git177\\libexec\\git-core\\git-gui\" \"--working-dir\" \"%1\"" [HKEY_CLASSES_ROOT\Directory\shell\git_shell] @="Git Ba&sh Here" [HKEY_CLASSES_ROOT\Directory\shell\git_shell\command] @="wscript \"f:\\git177\\Git Bash.vbs\" \"%1\"" 
+1
source

How do you do this for any other portable software?

thanks

0
source

Source: https://habr.com/ru/post/1341268/


All Articles