How can I associate .java files to a particular program
Via the command line, or script. I would like .java files to open in a program called textpad instead of notepad. Also is it possible to change the Icon in windows explorer to match the program it is associated to?
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
captain_planet
13 years ago
To do it properly (i.e, using the 'TextPad.java' ProgId) , here's the registry which you require (If you're using Textpad 5, of course):
You can either save it into a .reg file and import it like so:
REG IMPORT C:\TextpadJavaRegistry.REG (or do it using Regedit.exe - s etc)
Or you can write it via a VBScript. And there are TONS of VBScript registry-writing scripts out there....[;)]
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.java]
@="TextPad.java"
"PerceivedType"="text"
[HKEY_CLASSES_ROOT\TextPad.java]
@="Java Source File"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008
[HKEY_CLASSES_ROOT\TextPad.java\DefaultIcon]
@="C:\\Program Files\\TextPad 5\\TextPad.exe,0"
[HKEY_CLASSES_ROOT\TextPad.java\shell]
@=""
[HKEY_CLASSES_ROOT\TextPad.java\shell\edit]
[HKEY_CLASSES_ROOT\TextPad.java\shell\edit\command]
@="\"C:\\Program Files\\TextPad 5\\TextPad.exe\" -s"
[HKEY_CLASSES_ROOT\TextPad.java\shell\edit\ddeexec]
@="[open(\"%1\")]"
[HKEY_CLASSES_ROOT\TextPad.java\shell\edit\ddeexec\application]
@="TextPad.5.0"
[HKEY_CLASSES_ROOT\TextPad.java\shell\edit\ddeexec\topic]
@="System"
[HKEY_CLASSES_ROOT\TextPad.java\shell\open]
[HKEY_CLASSES_ROOT\TextPad.java\shell\open\command]
@="\"C:\\Program Files\\\\TextPad 5\\TextPad.exe\" -s \"%1\""
[HKEY_CLASSES_ROOT\TextPad.java\shell\print]
[HKEY_CLASSES_ROOT\TextPad.java\shell\print\command]
@="\"C:\\Program Files\\TextPad 5\\TextPad.exe\" -s -p \"%1\""
[HKEY_CLASSES_ROOT\TextPad.java\shell\printto]
[HKEY_CLASSES_ROOT\TextPad.java\shell\printto\command]
@="\"C:\\Program Files\\TextPad 5\\TextPad.exe\" -s -pt \"%1\" \"%2\" \"%3\" \"%4\""
You can either save it into a .reg file and import it like so:
REG IMPORT C:\TextpadJavaRegistry.REG (or do it using Regedit.exe - s etc)
Or you can write it via a VBScript. And there are TONS of VBScript registry-writing scripts out there....[;)]
Posted by:
clivebuckwheat1
13 years ago
Posted by:
captain_planet
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.