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.

  • 相关阅读:
    ehcarts绘制一个可以拖动的两条曲线的效果
    bootstrap-table如何根据不同传值进行渲染
    语音播报功能
    webpack命令监测文件变化
    webpacck打包完react后引入到html文件中报错:Target container is not a DOM element...
    react app相关知识
    redux-devtools安装
    react-devtools超级简单安装教程
    react-router v3和v4区别
    foreach循环的跳出
  • 原文地址:https://www.cnblogs.com/ebs-blog/p/6510435.html
Copyright © 2011-2022 走看看