Martijn Posted May 30, 2006 Share Posted May 30, 2006 (edited) Hi all,I'm a experienced PHP language coder and I would like to add it to my right click menu "New >" as a document template.Currently I go to this menu, whenever I want to create a new .php file, click the Text Document -template and rename its extension from .txt to .php. I don't like this way of working and was wondering if someone knows how to add more filetypes to this menu.Thanks in advance! Title edited -- Please, use [TAGS] in your topic's title.--SonicSorry Forgot about the tags, will use them next time --Martijn Edited May 31, 2006 by Martijn Link to comment Share on other sites More sharing options...
Yzöwl Posted May 31, 2006 Share Posted May 31, 2006 I can help you if you do the following:Copy & Paste the following line into your Run box%comspec% /c >"%userprofile%\desktop\php_reg.txt" reg query HKCR\.php /s open the php_reg.txt file on your desktop and copy & paste its contents here. Link to comment Share on other sites More sharing options...
Sonic Posted May 31, 2006 Share Posted May 31, 2006 Cleaned, I have posted very wrong solution Link to comment Share on other sites More sharing options...
Yzöwl Posted May 31, 2006 Share Posted May 31, 2006 I've no intention of doing anything complex, and other than the little piece of information I have requested from the questioner, neither will they. I will do everything other than download and double click using just this information. Link to comment Share on other sites More sharing options...
Martijn Posted May 31, 2006 Author Share Posted May 31, 2006 I did both suggestions (thanks for the quick replies btw ) but Sonic's one requires a restart I assume?Here is the code requested by Yzöwl:! REG.EXE VERSION 3.0HKEY_CLASSES_ROOT\.php <NO NAME> REG_SZ php_auto_file Link to comment Share on other sites More sharing options...
Yzöwl Posted May 31, 2006 Share Posted May 31, 2006 (edited) Double click this SFX.You should find the new entry after either a reboot or ending /restarting explorer.exe.<Edit>Attachment removed due to successful retrieval and use by the intended recipient!</Edit> Edited June 1, 2006 by Yzöwl Link to comment Share on other sites More sharing options...
Sonic Posted May 31, 2006 Share Posted May 31, 2006 Auto slap me x10 !You are right Yzöwl, I have answer too fast, I havn't checked the result.Moreover I have myself a regfile to delete/custom this menu !!! Btw, you can just try two times the "new" menu to look if new items are present. Link to comment Share on other sites More sharing options...
Martijn Posted June 1, 2006 Author Share Posted June 1, 2006 Thanks alot! I will try this when I come home Link to comment Share on other sites More sharing options...
Martijn Posted June 1, 2006 Author Share Posted June 1, 2006 I just tried it and it works excellent!Thanks a lot guys!Another question, the menu itself, I like to delete a few filetypes from the list. I think Sonic knows how to do this? Link to comment Share on other sites More sharing options...
Sonic Posted June 1, 2006 Share Posted June 1, 2006 Exaclty what I custom for this new menu, put the content into a new reg file. Sure you can adjust that to your needs.REGEDIT4[-HKEY_CLASSES_ROOT\.bmp\ShellNew][-HKEY_CLASSES_ROOT\.rtf\ShellNew][-HKEY_CLASSES_ROOT\.wav\ShellNew][-HKEY_CLASSES_ROOT\.zip\CompressedFolder\ShellNew][-HKEY_CLASSES_ROOT\.zip\ShellNew][-HKEY_CLASSES_ROOT\.cab\ShellNew][-HKEY_CLASSES_ROOT\.tgz\ShellNew][-HKEY_CLASSES_ROOT\.tar\ShellNew][-HKEY_CLASSES_ROOT\.lzh\ShellNew][-HKEY_CLASSES_ROOT\.lha\ShellNew][-HKEY_CLASSES_ROOT\.jar\ShellNew][-HKEY_CLASSES_ROOT\.gz\ShellNew][-HKEY_CLASSES_ROOT\.rar\ShellNew][-HKEY_CLASSES_ROOT\.bfc\ShellNew][-HKEY_CLASSES_ROOT\.doc\Word.Document.8\ShellNew][-HKEY_CLASSES_ROOT\.xls\Excel.Sheet.8\ShellNew][-HKEY_CLASSES_ROOT\.ppt\PowerPoint.Show.8\ShellNew][-HKEY_CLASSES_ROOT\.mpp\MSProject.Project.9\ShellNew][-HKEY_CLASSES_ROOT\.mdb\Access.Application.11\ShellNew][-HKEY_CLASSES_ROOT\.vsd\Visio.Drawing.11\ShellNew][-HKEY_CLASSES_ROOT\.odg\opendocument.DrawDocument.1\ShellNew][-HKEY_CLASSES_ROOT\.odp\opendocument.ImpressDocument.1\ShellNew][-HKEY_CLASSES_ROOT\.ods\opendocument.CalcDocument.1\ShellNew][-HKEY_CLASSES_ROOT\.odt\opendocument.WriterDocument.1\ShellNew][-HKEY_CLASSES_ROOT\.psd\ShellNew] Link to comment Share on other sites More sharing options...
gunsmokingman Posted June 1, 2006 Share Posted June 1, 2006 I made a VBS script that removes some of the templates context menu stuff. This removes the briefcase, bmp, doc, ppt, PspImage new templatesOn Error Resume Next Dim Act, DelReg, Fso, StrDel Set Act = CreateObject("WScript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject")'/-> ARRAY FOR WHAT TO GETS DELETED DelReg = Array( "HKCR\.bfc\ShellNew\Config\",_ "HKCR\.bfc\ShellNew\",_ "HKCR\.bmp\ShellNew\",_ "HKCR\.doc\Word.Document.6\ShellNew\",_ "HKCR\.doc\Word.Document.8\ShellNew\",_ "HKCR\.doc\WordDocument\ShellNew\",_ "HKCR\.doc\WordPad.Document.1\ShellNew\",_ "HKCR\.ppt\PowerPoint.Show.4\ShellNew\",_ "HKCR\.ppt\PowerPoint.Show.8\ShellNew\",_ "HKCR\.PspImage\PaintShopPro9.Image\ShellNew\")'/-> LOOP THAT DELETES THE REG ENTRIES For Each StrDel In DelReg Act.RegDelete StrDel Next '/-> COMPLETED MESSAGE Act.Popup "Completed Cleaning up the right click context menu", 4, "Clean Up Context menu", 0 + 32'/-> DELETES THE VBS FILE Fso.DeleteFile("CleanUpContextMenu.vbs")Link to SFX file of above script Link to comment Share on other sites More sharing options...
Yzöwl Posted June 1, 2006 Share Posted June 1, 2006 If you would like a quick list of the ones you have on your machine, run the following batch file, open the reg file it produces in the same location, remove the commenting symbol from the pertinent lines and double click the reg file to merge and remove them.@ECHO OFF &SETLOCAL ENABLEEXTENSIONS>NewFiles.reg ECHO REGEDIT4>>NewFiles.reg ECHO/FOR /F "DELIMS=" %%? IN ( 'REG QUERY HKLM\SOFTWARE\Classes /S ^|FINDSTR/I "\\\..*\\ShellNew$" 2^>NUL' ) DO ( IF ERRORLEVEL 0 (>>NewFiles.reg ECHO ;[-%%?]) )>>NewFiles.reg ECHO/ENDLOCAL &GOTO :EOF Link to comment Share on other sites More sharing options...
Sonic Posted June 1, 2006 Share Posted June 1, 2006 Yzöwl always the best ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now