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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
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):

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....[;)]
Answered 01/23/2011 by: captain_planet
Third Degree Brown Belt

Please log in to comment
0
thanks man will give it a go. Question the regkey works perfect, but textpad resides in C:\Program Files(x86) it's on a windows 7 x64 machines where the problems resides. I guess I have to change all instances of C:\Program Files\ to C:\Program Files(x86) ?
Answered 01/23/2011 by: clivebuckwheat1
Purple Belt

Please log in to comment
0
Yeah.....or try using the %ProgramFiles(x86)% environment variable instead......
Answered 01/24/2011 by: captain_planet
Third Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity