{"id":3641,"date":"2016-07-31T12:36:10","date_gmt":"2016-07-31T07:06:10","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=3641"},"modified":"2020-11-28T04:11:07","modified_gmt":"2020-11-28T04:11:07","slug":"fix-cannot-run-programs-without-typing-extension-exe-command-prompt","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/fix-cannot-run-programs-without-typing-extension-exe-command-prompt\/","title":{"rendered":"[Fix] Cannot Run Programs Without Typing the Extension (.EXE) in Command Prompt"},"content":{"rendered":"<p>If you&#8217;re unable to launch programs without having to type the extension &#8220;.exe&#8221; in a Command Prompt window, you need to fix your PATHEXT variable.<!--more--><\/p>\n<p>For instance, Notepad may launch correctly when you type <b>Notepad.exe<\/b>, but not when typing <b>Notepad<\/b>. The latter might show you the following error:<\/p>\n<blockquote><p>&#8216;notepad&#8217; is not recognized as an internal or external command,<br \/>\noperable program or batch file.<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3643\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/pathext-fix-1.png\" alt=\"cannot run programs without typing .exe extension pathext\" width=\"650\" height=\"329\" \/><\/p>\n<p>This happens if <code>.EXE<\/code> is missing in the PATHEXT variable. Use these steps to fix the problem<\/p>\n<h2>Reset PATHEXT variable<\/h2>\n<p>Press <kbd>WinKey<\/kbd> + <kbd>R<\/kbd>, type <code>SystemPropertiesAdvanced.exe<\/code>, and press <kbd>ENTER<\/kbd><\/p>\n<p>Click Environment Variables, and double-click PATHEXT<\/p>\n<p>Set the PATHEXT value as follows:<\/p>\n<pre>.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3642\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/pathext-fix-2-1.png\" alt=\"cannot run programs without typing .exe extension pathext\" width=\"650\" height=\"165\" \/><\/p>\n<h3>Quick Tip #1<\/h3>\n<p>To add additional extensions there, such as .PL, add a semi-colon (separator) and then followed by the file extension. Such as:<\/p>\n<pre>.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PL<\/pre>\n<h3>Quick Tip #2<\/h3>\n<p>When you run a command or program without mentioning the extension, Command Prompt uses the value of PATHEXT variable to determine which extensions to look for and in what order.<\/p>\n<p>If you have two files named &#8220;test.bat&#8221; and &#8220;test.vbs&#8221; in a folder, running &#8220;test&#8221; from a Command Prompt window would launch &#8220;test.bat&#8221;, because .BAT appears at the beginning of the PATHEXT variable. By moving .VBS to the front (after .EXE), you can make Command Prompt to launch &#8220;test.vbs&#8221; instead of &#8220;test.bat&#8221;. However, it&#8217;s advisable to use the default order unless you have some special requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re unable to launch programs without having to type the extension &#8220;.exe&#8221; in a Command Prompt window, you need to fix your PATHEXT variable.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3641","post","type-post","status-publish","format-standard","hentry","category-windows"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":79110,"url":"https:\/\/www.winhelponline.com\/blog\/default-system-and-user-environment-variables\/","url_meta":{"origin":3641,"position":0},"title":"List of SYSTEM and USER Environment Variables","author":"Ramesh","date":"July 25, 2025","format":false,"excerpt":"Windows has a default set of environment variables and their values. There are two types of environment variables: user environment variables (set for each user) and system environment variables (set for everyone). For example, the variable %USERNAME% represents the name of the currently logged-on user account. If you have inadvertently\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1113,"url":"https:\/\/www.winhelponline.com\/blog\/exe-files-open-notepad-fix-association\/","url_meta":{"origin":3641,"position":1},"title":"[Fix] .EXE Files Open in Notepad or Other App when Double-clicked","author":"Ramesh","date":"March 9, 2007","format":false,"excerpt":"Summary: Double-clicking an .exe file may open Notepad or any other application, displaying junk characters. On some systems, the Open with dialog may appear when double-clicking .exe files. This article explains how to fix the .exe file association in Windows 10 and 11. Did you accidentally use the Default Programs\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"exe files open in notepad","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":8738,"url":"https:\/\/www.winhelponline.com\/blog\/open-with-notepad-plus-right-click-menu-windows\/","url_meta":{"origin":3641,"position":2},"title":"Add &#8220;Open with Notepad++&#8221; to the Right-Click Menu","author":"Ramesh","date":"April 19, 2019","format":false,"excerpt":"Many users have replaced Notepad with Notepad++ as the default text editor on their computers. Others use Notepad++ only when needed, and launch it via the Open with menu and choose Notepad++ from the list of options. This post tells you how to add the Open with Notepad++ command to\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"Notepad++ right-click menu in Windows","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5732,"url":"https:\/\/www.winhelponline.com\/blog\/replace-notepad-text-editor-notepad-plus-association\/","url_meta":{"origin":3641,"position":3},"title":"How to Replace Notepad With Notepad++ or Other Editor","author":"Ramesh","date":"November 2, 2017","format":false,"excerpt":"If you\u2019re looking at how to replace Notepad with Notepad++ or any third-party editor, this post explains how to do it. Notepad++ is a free source code editor and Notepad replacement that supports several languages. Let\u2019s see how you can replace Notepad with Notepad++ without replacing any system files. Notepad\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"notepad plus replace debugger notepad.exe","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/debugger-notepad-plus-switch.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/debugger-notepad-plus-switch.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/debugger-notepad-plus-switch.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/debugger-notepad-plus-switch.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4813,"url":"https:\/\/www.winhelponline.com\/blog\/cmd-here-windows-10-context-menu-add\/","url_meta":{"origin":3641,"position":4},"title":"Add &#8220;Open command window here&#8221; to Context Menu in Windows 10","author":"Ramesh","date":"December 13, 2016","format":false,"excerpt":"In the recent versions of Windows 10 (Creators Update and higher), the \"Open Command Prompt here\" context menu entry has been removed and is replaced by \"Open PowerShell window here\". Microsoft, in an effort to bring the best command line experiences to the forefront for all power users, has made\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"cmdhere context menu icon","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/cmdhere-context-menu.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":30783,"url":"https:\/\/www.winhelponline.com\/blog\/dism-exe-not-recognized-cmdlet-ps\/","url_meta":{"origin":3641,"position":5},"title":"[Error] Dism.exe is not recognized as the name of a cmdlet","author":"Ramesh","date":"December 11, 2022","format":false,"excerpt":"When you run a DISM.exe command-line in PowerShell, the command may not be recognized. The following error is shown when you do so: dism.exe : The term 'dism.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"dism.exe not recognized - add system32 to PATH","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/12\/dism-system32-path-missing-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/12\/dism-system32-path-missing-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/12\/dism-system32-path-missing-1.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/3641","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=3641"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/3641\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=3641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=3641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=3641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}