I don't use Visual Basic, etc. so there may be a function built in, however if not (and assuming you want your code to work pre-vista) then I believe you must make changes directly to the registry.
I found the following code snippet...
@="Executable Jar File"
@="C:\\Program Files\\JavaSoft\\JRE\\1.3.1\\bin\\javaw.exe -jar %1"
If you place this is a .reg file and execute it, necessary registry changes should be made.
Personally, I would use API functions such as RegOpenKeyEx but this may be more complicated.
I Am using Win Xp Pro And i only need it to work on that
i Tried to associate a .tga file with this
@="Executable Jar File"
@="C:\\Documents and Settings\\TheKiller\\Desktop\\test.ico -tga %1"
but it did nothing...
Would you please Make some notes on Where to add the file Extension and the Icon etc
Ok, I've looked more closely,
For a .txt file, four lines appear to be needed for minimum functionality.
Normally the icon will be a .exe file, and the index that follows it will be zero or a positive value.
You might want to use %ProgramFiles% to specify the icon and .exe file.
Since I don't use .reg files myself, I can't guarantee this is correct.
In the Windows Folder Options You are able of Selecting the Icon of the X FileType The message it will say when you Right Click it for Example "Run X File","Open X File"
and the program you want to open the file With
i need this mostly For .PHP Files to associate it faster Without going into the Folder Options
I'm not sure I understand you, but if you want to add additional verbs (i.e. menu options) simply add extra lines such as...
@="%SystemRoot%\system32\NOTEPAD.EXE /p %1"
You can also add an alias
@="Print this file"
i would like a file that has the fallowing Options that you may find in the :
1. a .ico image that will represend the File
2. Program to open the file
3. a Action/option you see when you right click the file like Open PHP File
I believe I covered these points above.
but i would like you to but them (each lines)in the order you consider right as i know nothing about reg files
could you please set it for a .PHP Extension ?
Thanks in Advance
i have tried this to register a .HTML File
it wont work........
@="Executable HTML File"
@="C:\\Program Files\\Notepad++\\notepad++.exe -html %1"
@="C:\Extension Ico\HTML.ico /p %1"
@="Open With Notepad++"
Try the following, however, if .htm and .html are already assigned in the registry, making arbitrary changes may break existing functionality. To avoid this, I would suggest working with the registry directly - see [alanphipps.com...] this should allow to to make additions to existing settings rather than break existing settings.
Also, I don't use notepad++ so the /p switch may not work and I am not certain that .ICO files can be used to specify an icon in this way.
@="Edit with Notepad++"
@="C:\Program Files\Notepad++\notepad++.exe %1"
@="Print using Notepad++"
@="C:\Program Files\Notepad++\notepad++.exe /p %1"
i runned the script and restarted PC
it didnt really did much.........
it opens the file in the normal notepad and the icon works
the other settings like Edit with Notepad plus etc dont work
There's no need to restart the computer after making these changes. As for it not working, I suggest you use RegEdit to verify the changes were made correctly and then check filenames and paths.
Hello after a long time .. lol
yesterday i have became a bit more familiar with the registry coding
i saw that you can export files etc from the registry editor and i think i've got it :D
i will try to make some page with a few forms to generate the files
but i got to look into the header thing to force downloads :-?