How to Fix “ShellExecute failed (2): Is this command correct?” on Notepad++
2017-03-06 16:11
591 查看
Problem:
When you click right-click->Edit with Notepad ++ and get the error “ShellExecute failed (2): Is this command correct?” as seen below:Solution of ShellExecute Failed (2) Error:
This problem seems to happen after setting Notepad++ to run as administrator on Windows.To fix it, we will do the following:
1. Open the registry by pressing Win+R (window key and the “r” keys), following by entering “regedit” without the quotes and press enter
2. Go to the HKEY_CLASSES_ROOT key as shown below
3. Search for “notepad++.exe” under that key which has an entry Edit with Notepad++ or Edit with &Notepadd++ (Below is an example)
4. Once found, delete the whole key (it is recommended to take a backup first using right-click->Export first)
If done correctly, the “Edit with Notepad ++” would disappear like shown in the below before/after figure.
Now we need to recreate it but a working version this time.
5. Go to
HKEY_CLASSES_ROOT\*\shell
6. Create a new key under shell called
OpenWithNotepadand create a subkey under that called
commandas seen below:
7. Inside the
OpenWithNotepadkey, set the (Default) string variable to “Edit with Notepad ++”
8. Create a new string variable called icon and set the value to
path-to-notepad++.exewhere path-to-notepad++.exe is the full path, e.g.
C:\Program Files\Notepad++\notepad++.exe. In my case, I had to set it to
C:\Program Files (x86)\Notepad++\notepad++.exesince I am running a windows 64-bit version.
9. Inside the
commandkey, set the default string as
"path-to-notepad++.exe" "%1"where path-to-notepad++.exe is the full path as we did in step 8
You are done, now you should find a working “Edit with Notepad++” that does not throw out the error in the beginning of this post.
-----
以上是网络上的解决办法,我觉得只要在安装一边notepad 默认路径安装到Program Files (x86) 就可以解决这个问题,因为好多64为的软件安装后会出现这种类型的问题,例如PL/SQL developer.
相关文章推荐
- [转]解决右键用notepad++打开提示【ShellExecute failed (2): Is this command Correct? (Fix) 】
- NotePad++ "ShellExecute failed(2): Is this command correct?"
- Win10 NotePad++ “ShellExecute failed (2): Is this command correct?”
- DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command
- ClearCase - How to pass 'alias' to sub-shell after setview command is executed.
- DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command f
- DEPRECATED: Use of this script to execute hdfs command is deprecated.
- Notepad++: Load langs.xml failed! — and how to fix it
- MongoDB not authorized on admin to execute command --auth Authentication failed.
- unable to execute QEMU command 'migrate': this feature or command is not currently supported
- How to fix: Recieve error "Unable to display this Web Part" on Data Views after restoring site from backup
- Failed to install ISKernel Files,make sure you have appropriate privileges on this machine
- swagger ui js 错误:Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of typ
- Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node 解决办法
- error: internal error: unable to execute QEMU command 'migrate': this feature or command is not cur
- [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.5.0-rc1:compile (default) on project zeus-web: Command 解决
- How to fix “Firefox is already running” error by Matt Cutts on January 2, 2007 in How to,Linux/Ubu
- How to fix this issue: Type Coercion failed: cannot convert flash.events::Event@8eda061 to starling.
- hadoop2.6.0实践:A01 问题处理 DEPRECATED: Use of this script to execute hdfs command is deprecated.
- DEPRECATED: Use of this script to execute hdfs command is deprecated.