Ok, I have good news and bad news ...
As for your Step 2 (settings icon for a specific file):
Since you are talking about "Registry Entries", I assume that you are on Windows. In this case, I am afraid that you cannot change the icon of a specific file unless it is a shortcut or a .EXE or .DDL file (which may contain resources such as icons). What you can change is the default icon for the file type , which means that all files of the same type will be affected (and this clearly does not meet your requirement).
As for your Step 1 (changing the context menu):
To create the structure you described (the "File Maker" submenu with several entries for different states ("Planned work", "Work with half the work", etc.)) in Windows 7 or later , you need to create a static cascading menu, like described here . (In WindowsXP and earlier, you need to implement ContextMenuHandler, which is a much more complex task, which I am not going to cover in this asnwer).
Code example :
You can run the following commands from the command line (with administrative privileges) or copy and paste the commands into a .BAT file, and then run it as an administrator. These commands perform the following actions: first register the submenu for each file (see "*" in the registry section) and the available submenu entries, and then set the displayed text and command for each submenu.
A WARNING. Before making any changes, it is recommended that you always back up the registry. The registry is a delicate design, so please seek help at your own risk :)
REG ADD "HKEY_CLASSES_ROOT\*\shell\File Marker" ^ /v "MUIVerb" /t REG_SZ /d "File Marker" /f REG ADD "HKEY_CLASSES_ROOT\*\shell\File Marker" ^ /v "SubCommands" /t REG_EXPAND_SZ /d "WinIconChanger.PLANNED_WORK;WinIconChanger.HALF-DONE_WORK;WinIconChanger.DONE_WORK" /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.PLANNED_WORK" ^ /v "MUIVerb" /t REG_SZ /d "Planned work" /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.PLANNED_WORK\command" ^ /ve /t REG_SZ /d "\"C:\path\to\jre\bin\javaw.exe\" -jar \"C:\path\to\WinIconChanger.jar\" \"PLANNED_WORK\" \"%%1\"" /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.HALF-DONE_WORK" ^ /v "MUIVerb" /t REG_SZ /d "Half-done work" /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.HALF-DONE_WORK\command" ^ /ve /t REG_SZ /d "\"C:\path\to\jre\bin\javaw.exe\" -jar \"C:\path\to\WinIconChanger.jar\" \"HALF-DONE_WORK\" \"%%1\"" /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.DONE_WORK" ^ /v "MUIVerb" /t REG_SZ /d "Done work" /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.DONE_WORK\command" ^ /ve /t REG_SZ /d "\"C:\path\to\jre\bin\javaw.exe\" -jar \"C:\path\to\WinIconChanger.jar\" \"DONE_WORK\" \"%%1\"" /f PAUSE
Remember to replace "C: \ path \ to \ WinIconChanger.jar" and "C: \ path \ to \ jre \ bin \ javaw.exe" with the actual paths on your system.
To undo the changes made to the registry, you can execute these commands (or save them in a .BAT file and run) with administrative privileges:
REG DELETE "HKEY_CLASSES_ROOT\*\shell\File Marker" /f REG DELETE "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.PLANNED_WORK" /f REG DELETE "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.HALF-DONE_WORK" /f REG DELETE "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WinIconChanger.DONE_WORK" /f PAUSE
Of course, you will need a .JAR file that will take two arguments, namely the state of the job (e.g. PLANNED_WORK, DONE_WORK, etc.) and the path to the file with right-clicking and doing something useful with them (if you could only change the file icon: D).
Here is an example class :
class WinIconChanger { static public void main(String[] args) { String filePath = "UNKNOWN"; String state = "UNKNOWN"; if (args.length == 2) { filePath = args[1]; switch (args[0]) { case "PLANNED_WORK": case "HALF-DONE_WORK": case "DONE_WORK": state = args[0]; break; default: break; } } if ("UNKNOWN".equals(state)) { javax.swing.JOptionPane.showMessageDialog( null, "Unknown file or state !", "WinIconChanger Error", javax.swing.JOptionPane.ERROR_MESSAGE); } else { String msg = String.format( "Let assume I just changed the icon of '%s' to %s !", filePath, state); javax.swing.JOptionPane.showMessageDialog( null, msg, "WinIconChanger Info", javax.swing.JOptionPane.INFORMATION_MESSAGE); } } }
(This is just a sketchy example, not production-ready code. You need to make sure that the second argument really matches the path to the existing file, fine-tunes error messages, catch Exceptions, etc.)