How to manually register context menus using command line - tortoisegit

Is there some way how I could manually register all default context menus within command line?
Something like: TortoseGitProc.exe /command:register-default-context

There is no cli switch for registering the context menu as this is the task of the installer (as there is no portable version of TortoiseGit (cf. https://tortoisegit.org/issue/726)).
Please note, that w/o the installer you won't have any icon overlays.
You can, however, if you really want to, look into the source of the installer to build your own .reg file (cf. https://gitlab.com/tortoisegit/tortoisegit/blob/2258883b76f516432dc110f8659f92d0d68c1796/src/TortoiseGitSetup/StructureFragment.wxi#L43).

Related

How to change default Terminal in Source Tree on windows

I am working on Windows 7 with Source Tree. Because I don't like the default cmd.exe I want to change it to Console2 such that Source Tree will open Command2 instead of Cmd as terminal.
It appears you can't do it, at least in any obvious way. There are a couple of solutions/workarounds that you can use here:
Pick a different favorite terminal. ConEmu is a wrapper for CMD.exe that will act as your default terminal if you tell it to [I thought Console2 could do this as well]. Also - forgive the editorial - ConEmu is way, way, better than Console2.
You can add a custom action in the menu. From the global options go to Custom Actions tab and add an action to Open in Terminal using the console you want. This isn't quite as cool as just hitting the terminal icon, but you can easily accomplish the same outcome.
Unfortunately, these are the best there are for now.
Note: Based upon the link that #sendmoreinfo posted, waiting for Atlassian to add this by default may be better way to go for your purposes. Only problem with that may be is that according to some the newest updates to Source tree are terrible, so I haven't updated as of yet.
Note 2: Though this won't do what you want, there is an Option in the settings under the Git Tab that allows you to Set Git Bash as default prompt. That may or may not get you closer to where you want to be.
You may add Windows Terminal as Custom Action. You may run custom action in context of selected file. Define a new custom action as shown below.

Add java argument to windows right click? [duplicate]

How would one go about adding a submenu item to the windows explorer context menu (like for example 7-Zip does) for a Java application?
I am aware of two ways to do it. The fancy way is to write a windows shell extension, which is how powerarchiver, winzip etc do it I believe (this involves running code to determine what the context menu items will be dependent on the file chosen).
The simple way, for simple functionality, is you can add an entry in the registry :
HKEY_CLASSES_ROOT\<file type>\shell\<display text>\command
Where <file type> is the files that this context menu should apply to i.e. *, .mdb, .doc
and
<display text> what you want to show in the context menu.
Then add the default string as a path to the application you want to launch from the context menu, and you can use %1 to refer to the currently selected file i.e. for MS Access I use :
HKEY_CLASSES_ROOT\*\shell\MS Access 2000\command
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "%1"
This then adds a context menu item for any file I select (hence the *), which allows me to launch it in MS Access 2000.
Of course, always back up your registry before hacking it.
Your program could do this during install, or on first run.
You could also package the java program in an installer like NSIS and you could use NSIS script to generate explorer context menu

Arbitrary .cmd script as screensaver in Windows 7 / XP

I have a fullscreen OpenGL application, written in Scala. It is supposed to being launched as .cmd file that sets up classpath (some .class files, some of them are third-party libraries and optionally in .jars) and runs JVM with the right parameters. I'm wondering, is there an easy way to use this .cmd file as Windows screensaver? (without usual screensaver preview and settings dialog, they are not needed there) I guess I need to register the application somewhere? Is there any restriction on what file type it must be?
You can install a screensaver by doing as #Kevin suggested and right click the file and install (provided that this is a .scr file). Or you can copy the file straight to C:\Windows or sometimes C:\Windows\system32.
However, unless the file is a valid screensaver then it won't show up in the list of screensavers when you choose which one you want, so I think you are out of luck.
Unless you created your own screensaver, and then you might be able to launch the file from one of the events it has.

How to change file icon in Turbo C++ and cc3270.dll

I started to use Borland's Turbo C++ a few days ago. I actually have two questions.
1.: How can i change the file icon?? If i create a program (Console Application), it will always have this blue icon (buildings or something like that on it), and i can't find it anywhere, how to change it to the default "none" icon (which like in Dev-C++ is the default).
2.: If i create a console application, and i want to run on my virtual pc, then it says that the CC3270.DLL is missing. If i copy it to c:\windows\system32\ then it will working perfectly. But i want to avoid this way. So is it possible, to change a setting or something like that, that my application won't need this file? It's disturbing beacuse, if i want to use my program on a computer which hasn't this dll, than i have to copy it there, on every machine.
Thanks in advance!
kampi
1.you can see these links
How do I change the program icon for a console application?
How to Create a Custom Program Icon for a Console Mode Application
2.If you build using the dynamic Run-Time Library, you will also have to distribute one or more of the Run-Time Library DLLs CC3270.DLL or CC3270MT.DLL and the memory manager DLL.
you must uncheck the option "build with runtime packages" located in the project options.
Bye.

Enable dropping a file onto a Ruby script

I'm creating a small ruby script to resize images and save them in a specified directory. I'd like the application to be as transparent as possible.
Is it possible to allow file dropping onto my Ruby script in all platforms? For instance, the user drags a file onto the script, which then takes the file path as an argument and resizes the image accordingly -- No GUI, no console, etc..
The behavior of drag & drop is dependent on the OS (and in case of Linux of the Window Manager), so no.
In Windows, you get the behavior you want for free. Just put a .rb file on the Desktop, and the files dragged onto it will be arguments to your script.
Another easy way for integrating with Windows is to write to registry entry HKLM\Software\Classes*.jpg\myhandler\command with the command you want to appear in the context menu of Windows Explorer (right click on a jpg file will popup a menu which will have your script in the menu).
I don't use drag & drop at all in Linux, so I wouldn't know how to do that there. I would expect it to have more security issues (permissions must be right, ...) but you could get there by creating a .desktop file, see http://standards.freedesktop.org/desktop-entry-spec/latest/ for the complete standard, or read some examples from ~/Desktop/*.desktop .
Platform dependend, so here for windowsusers and reference only.
Save the following to a .reg file and load it by doublecliking it, tested on Windows Vista and 7
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\rbfile\ShellEx\DropHandler]
#="{86C86720-42A0-1069-A2E8-08002B30309D}"
[HKEY_CLASSES_ROOT\rbwfile\ShellEx\DropHandler]
#="{86C86720-42A0-1069-A2E8-08002B30309D}"
[HKEY_CLASSES_ROOT\RubyFile\ShellEx\DropHandler]
#="{86C86720-42A0-1069-A2E8-08002B30309D}"
[HKEY_CLASSES_ROOT\RubyWFile\ShellEx\DropHandler]
#="{86C86720-42A0-1069-A2E8-08002B30309D}"
Such behavior would surely be platform specific, as drag-and-drop is implemented by the OS in this case, not by ruby.
So answering your question: no, it is not possible.
You can use platypus on os x to create a wrapper around your script.
http://sveinbjorn.org/platypus
regards
Claus

Resources