zoukankan      html  css  js  c++  java
  • How to Fix “ShellExecute failed (2): Is this command correct?” on Notepad++

    Problem:

    When you click right-click->Edit with Notepad ++ and get the error “ShellExecute failed (2): Is this command correct?” as seen below:

    Notepad++ Extension- Error ShellExecute

    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

    regedit

    3. Search for “notepad++.exe” under that key which has an entry Edit with Notepad++ or Edit with &Notepadd++ (Below is an example)

    Edit with key

    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 OpenWithNotepad and create a subkey under that called command as seen below:

    OpenWithNotepad

    7. Inside the OpenWithNotepad key, 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++.exe where path-to-notepad++.exe is the full path, e.g. C:Program FilesNotepad++ otepad++.exe. In my case, I had to set it to C:Program Files (x86)Notepad++ otepad++.exe since I am running a windows 64-bit version.

    9. Inside the command key, 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.

  • 相关阅读:
    善用VS中的Code Snippet来提高开发效率
    c#获取远程文件更新时间
    图解VS2008单元测试及查看代码覆盖率
    常用关于 JavaScript 中的跨域访问方法
    Jquery中使用setInterval和setTimeout
    外链图片也有风险吗?
    设计模式学习总结抽象工厂模式(Abstract Factory Pattern)
    斐波拉杰博弈 取石子(五)
    后缀表达式 NYOJ 257
    杭电 1085 Holding BinLaden Captive!
  • 原文地址:https://www.cnblogs.com/ebs-blog/p/6510435.html
Copyright © 2011-2022 走看看