Add context menu options for .hex files - windows

I'm trying to add to Windows context menu of .hex files only a python script, but I can't find .hex extension in the "HKEY_CLASSES_ROOT". Currently, I have the script in the context menu for any kind of file but would like to limit it to only appearing when interacting with hex files.
What's the correct way of doing this?
Can this configuration be handled via a python script?

Follow the documentation, this stuff has not changed much since 1995.
HKCU\Software\Classes\.hex
""=myhextype
HKCU\Software\Classes\myhextype\shell\open\command
""="c:\path\myapp.exe" "%1"

Related

Shell script to create new file on right click for macOS

I would like to add a context menu item in MacOS Mojave which gives the option to create a new file in the finder on a right click (the way you would in windows). I would also like to be able to specify the file type (text, word, html, css, javascript, etc)
I have followed a tutorial online in order to create the context menu item with automator but I am not familiar with writing shell scripts.
is it just as simple as:
for f in "$#"
do
touch "$f"
done
I was able to implement this following the instructions here: How to get Create New Text File from context menu
The only drawback as it stands is that you need to select a folder in finder to get the context menu. I would like to be able to click in the current I am in and get the menu but I can live with this. Hope this helps someone else.
This tool provides the "Create a file here" option out of the box. With this tool you can easily create your own options as well by writing simple shell scripts. The tool is free and the page has a link to the source if you want to check the source. The source has a shell script that creates a file in a directory that is given as an argument to the script. The script avoids file name conflicts when creating new files.

How to manage files with a batchscript via "Send To"?

I want to improve my file managent and need some help to get started.
For this specific script, my idea is the following:
while in Explorer
rightclick a file -> Send To -> "Apps[.bat]"
Then the script starts and does the following:
moves the whole directory (and subfolders) of the selected file to a specified location (in my case C:\Users\Name\Desktop\Apps\Files)
so sending Name\Downloads\Coolportableapplication\Coolapp.exe to the batch results in Name\Desktop\Apps\Files\Coolportableapplication\Coolapp.exe
creates a shortcut of C:\Users\Name\Desktop\Apps\Files\Coolportableapplication\Coolapp.exe in C:\Users\Name\Desktop\Apps
Is this generally possible with a batchscript?
This isn't my first batch but I've never dealt with unspecified files and English isn't my native language so I couldn't really find anything useful for my cause, though I am sure my little script won't be too much of a problem for you. Based on that batch, I want to create similar scripts but I just have no idea how to begin with that one.
Thanks a lot!
No need for a batch file but anyway.
1: Type shell:sendto into your explorer window and copy the shortcut to your directory "C:\Users\Name\Desktop\Apps\Files". This directory will now show as default in your Send To options.

Add startup options to a file (Windows)

Is it possible to add startup options directly to the exe instead of a link file?
F. e. You have the command "-minimized". Now you can just add this to the shortcut file and the program will start minimized.
Is there a way to do this to the exe file directly? (Hex Editor?)
Thanks in advance
In order to physically change an executable file it would need to be modified from source code and recompiled. I don't recommend changing anything in an executable file using a Hex Editor unless you are an expert and know what you are doing to reverse engineer an application.
I would suggest that you simply create a shortcut and modify that to minimize / maximize the application on open as you mentioned. That way you won't risk completely corrupting the executable.

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

Expression Web: Shortcut doesn't point to an exe file, but I want to use it to edit

Problem: I have to support users who need to edit web pages. Some of these web pages exist only as textarea controls. Fortunately, there is a firefox plugin that allows the user to open the textarea in a default text editor. Unfortunately, this plugin requires you to point to the EXE file of the text editor you want to invoke.
This is a reasonable requirement, but ##$%^ Microsoft Expression Web is one of those applications whose shortcut .lnk file does not appear to point to a real EXE file. If there is an EXE file somewhere, it's hidden.
Question:
How can I locate the actual EXE file so people can configure Microsoft Expression web to be their editor of choice?
Update: I should have emphasized that I was looking for a way to automate this via script or batch file (hence the SO posting, in case anyone's "not-programming-related" spidey sense was tingling).
I found my executable in the following location:
C:\Program Files\Microsoft Expression\Web Designer\EXPRWD.EXE
I'm not sure if that gives you what you need, but you can always have your users (or programmatically) search for EXPRWD.EXE and go from there.

Resources