{"id":24227,"date":"2021-06-18T14:08:02","date_gmt":"2021-06-18T08:38:02","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=24227"},"modified":"2021-06-18T14:29:26","modified_gmt":"2021-06-18T08:59:26","slug":"associate-file-no-extension-program","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/associate-file-no-extension-program\/","title":{"rendered":"How to Associate a Program with Files that have No Extension"},"content":{"rendered":"<p>Shell extensions for file names with no file extension can be registered under the following:<\/p>\n<pre>[HKEY_CLASSES_ROOT\\.]<\/pre>\n<p><!--more--><\/p>\n<p>For example, to associate a program (for example, Notepad.exe) to open all files with no extension, use the following registry keys:<\/p>\n<pre>[HKEY_CLASSES_ROOT\\.]\r\n@=\"\"\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell]\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell\\open]\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell\\open\\command]\r\n@=\"&lt;path to notepad.exe&gt; %1\"<\/pre>\n<p>Here is an alternative method:<\/p>\n<pre>[HKEY_CLASSES_ROOT\\.]\r\n@=\"NoExtFile\"\r\n\r\n[HKEY_CLASSES_ROOT\\NoExtFile]\r\n\r\n[HKEY_CLASSES_ROOT\\NoExtFile\\shell]\r\n\r\n[HKEY_CLASSES_ROOT\\NoExtFile\\shell\\open]\r\n\r\n[HKEY_CLASSES_ROOT\\NoExtFile\\shell\\open\\command]\r\n@=\"&lt;path to notepad.exe&gt; %1\"<\/pre>\n<p>NOTE: &#8220;<code>NoExtFile<\/code>&#8221; is not a predefined name, and therefore it can be anything. Adding other shell extensions is similar to adding shell extensions for file names with extensions.<\/p>\n<p>This article was previously published under Microsoft KB Q236014, titled &#8220;INFO: Shell Extensions for File Names with No File Extension.&#8221;<\/p>\n<p>Whereas, implementing the menu under the following key shows the menu for all file types &#8212; including the extension-less files.<\/p>\n<pre>HKEY_CLASSES_ROOT\\*\\shell<\/pre>\n<h3>Example<\/h3>\n<p>You can add shell menu entries (e.g., &#8220;<a href=\"https:\/\/www.winhelponline.com\/blog\/add-the-open-with-notepad-context-menu-option-for-all-file-types\/\">Open with Notepad<\/a>&#8220;, &#8220;<a href=\"https:\/\/www.winhelponline.com\/blog\/open-with-notepad-plus-right-click-menu-windows\/\">Open with Notepad++<\/a>&#8220;, etc.) for extension-less files under the <code>[HKEY_CLASSES_ROOT\\.]<\/code> registry key.<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell\\openwithnotepad]\r\n@=\"Open with Notepad\"\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell\\openwithnotepad\\command]\r\n@=\"c:\\\\windows\\\\notepad.exe \\\"%1\\\"\"<\/pre>\n<p>The above <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">registry file<\/a> adds the following registry keys and values:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24228\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2021\/06\/associate-extension-less-files-2.png\" alt=\"associate extension-less files with a program\" width=\"510\" height=\"150\" \/><\/p>\n<p>The Notepad entry is now shown in the right-click menu for extension-less files (only).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24229\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2021\/06\/associate-extension-less-files-1.png\" alt=\"associate extension-less files with a program\" width=\"440\" height=\"99\" \/><\/p>\n<p>As there are no other menu entries, the Notepad option will be the default &#8212; i.e., double-clicking a file with no extension opens it in Notepad. If you don&#8217;t want to make it the default context menu option, you&#8217;ll have to add the <code>NeverDefault<\/code> registry value, as below:<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell\\openwithnotepad]\r\n@=\"Open with Notepad\"\r\n\"NeverDefault\"=\"\"\r\n\r\n[HKEY_CLASSES_ROOT\\.\\shell\\openwithnotepad\\command]\r\n@=\"c:\\\\windows\\\\notepad.exe \\\"%1\\\"\"<\/pre>\n<p>The above registry file adds the custom menu item but doesn&#8217;t make it as the default &#8212; i.e., &#8220;Open with&#8221; remains as the default option.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shell extensions for file names with no file extension can be registered under the following: [HKEY_CLASSES_ROOT\\.]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[441],"class_list":["post-24227","post","type-post","status-publish","format-standard","hentry","category-windows","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":213,"url":"https:\/\/www.winhelponline.com\/blog\/add-the-open-with-notepad-context-menu-option-for-all-file-types\/","url_meta":{"origin":24227,"position":0},"title":"Add &#8220;Open with Notepad&#8221; to the Right-click Menu for all file types","author":"Ramesh","date":"April 24, 2008","format":false,"excerpt":"There are situations where you need to open plain-text files having an unknown or unregistered file extension using Notepad. By default, no file association exists for extension-less files and files with unknown extension in Windows. So, to open those files, you use the Open With option and select Notepad from\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"add open with notepad to right-click","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/open_with_notepad.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/open_with_notepad.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/open_with_notepad.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":273,"url":"https:\/\/www.winhelponline.com\/blog\/add-the-open-file-location-context-menu-for-shortcuts-in-windows-xp\/","url_meta":{"origin":24227,"position":1},"title":"How to Add &#8220;Open File Location&#8221; Right-Click Option in Windows XP","author":"Ramesh","date":"May 9, 2008","format":false,"excerpt":"Windows Vista and Windows 7 include the Open file location context menu item for Shortcuts, which helps you quickly open the target folder of a shortcut. In Windows XP, it takes four mouse clicks to accomplish the task. To open the target folder of a shortcut in Windows XP, you\u2026","rel":"","context":"In &quot;Windows XP&quot;","block_context":{"text":"Windows XP","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-xp\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/opentargetdir.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4021,"url":"https:\/\/www.winhelponline.com\/blog\/take-ownership-via-right-click-context-menu-add\/","url_meta":{"origin":24227,"position":2},"title":"Take Ownership of File or Folder via Right-click Menu","author":"Ramesh","date":"September 6, 2016","format":false,"excerpt":"We saw how to Take Ownership of a file or folder using the takeown.exe command-line tool. You can add the \"Take Ownership\" command to the right-click menu to make it easier to access. Add \"Take Ownership\" to the right-click menu Download take_ownership_context_menu.zip, unzip the file, and run the enclosed REG\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"take ownership - success - check status","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/takeown_results_cmd.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/takeown_results_cmd.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/takeown_results_cmd.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/09\/takeown_results_cmd.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":48037,"url":"https:\/\/www.winhelponline.com\/blog\/new-rich-text-format-missing-windows-11\/","url_meta":{"origin":24227,"position":3},"title":"New \u201cRich Text Format\u201d (RTF) missing from Right-Click menu in Windows 11","author":"Ramesh","date":"May 22, 2023","format":false,"excerpt":"In Windows 11, the New menu does not list the \"Rich Text Format\" (often abbreviated RTF) entry by default. This happens even though you associate all .RTF files with WordPad instead of MS Word. (The Rich Text Format is a proprietary document file format developed by Microsoft for cross-platform document\u2026","rel":"","context":"In &quot;Windows 11&quot;","block_context":{"text":"Windows 11","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-11\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4432,"url":"https:\/\/www.winhelponline.com\/blog\/set-custom-icon-pdf-files-firefox-default-pdf-viewer\/","url_meta":{"origin":24227,"position":4},"title":"Set Custom icon for PDF Files with Chrome or Firefox as the Default PDF Viewer","author":"Ramesh","date":"October 24, 2016","format":false,"excerpt":"If you've associated PDF files with Google Chrome or Mozilla Firefox to make use of browser's built-in PDF viewing capability, the PDF and HTML files would show up with the same Chrome or Firefox icon in File Explorer. This post tells you how to set a custom different icon for\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"chrome pdf icon default viewer","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/chrome-pdf-viewer-icon-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/chrome-pdf-viewer-icon-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/chrome-pdf-viewer-icon-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/chrome-pdf-viewer-icon-3.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2603,"url":"https:\/\/www.winhelponline.com\/blog\/double-extensions-files-save-as-dialog-programs-avoid\/","url_meta":{"origin":24227,"position":5},"title":"[Fix] Save As dialog adds double extensions when saving files","author":"Ramesh","date":"April 3, 2016","format":false,"excerpt":"When you use the Save or Save As dialog in various programs and type a file name and click Save, the file name may contain double extensions. For instance, if you use your text editor to create a .php file, and save it, the file may be saved as filename.php.txt.\u2026","rel":"","context":"In &quot;Microsoft&quot;","block_context":{"text":"Microsoft","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/double-ext-2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/24227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=24227"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/24227\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=24227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=24227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=24227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}