Right-click on .bat files tries to run them

2. Help
2005-05-21
2012-11-13
  • Thank you so much for this wonderful tool. Can you consider fixing one thing? When I edit .bat files using the right-click Notepad++ context menu item, it actually runs the batch files instead of opening them. I can edit batch files, but I have to open npp first and then open the file by drag-and-drop or the open menu.

    Two other minor usability issues:
    - Could you please connect Ctrl+P to print?
    - Could you default wrap-around on search/replace?

    Thanks again for your efforts.

     
    • Don HO
      Don HO
      2005-05-23

      > - Could you please connect Ctrl+P to print?

      It's done in v2.9

      > - Could you default wrap-around on search/replace?

      I'll consider it.

      > When I edit .bat files using the right-click Notepad++ context menu item,
      > it actually runs the batch files instead of opening them.

      I can't reproduce the bug. Obviously you're using an old version. Try the v2.9 and please let me know if your problem is solved.

      Don

       
    • I (a different "anonymous") get exactly the same problem - with v2.9
      It also happens with .vbs files.

       
    • I can reproduce the bug described about right-clicking on a file and choosing "Notepad++" rather than open or whatever and it will automatically try and run the VBS or BAT file.  I am using v2.9 as well...I just downloaded v3.0 I will try it today and let you know soon.

       
    • Paul Gower
      Paul Gower
      2005-06-06

      I am using v3.0 and I am getting the same bug described above that you were unable to reproduce...but I think I may be able to give you enough information for you to be able to reproduce the error and hopefully find out why it is doing what it is doing.

      Steps to Reproduce Run Script (instead of edit):
      1. Make sure Microsoft AntiSpyware Beta 1 (v1.0.509) is installed and make sure "real-time protection" is active

      2. Create a test.bat file and put the following code in it:
      echo Hello World
      pause

      3. Right-click on the file and choose the "Notepad++" option to open the file

      4. You should see the MS Anti Spyware popup in the lower right corner warning you about the script that is about to run...etc.  Select Allow as the option (you can check or uncheck the remember my selection check box either way is fine)

      5. You will see that the BAT file ran and displayed "Hello World" and "Press any key to continue..."

      6.  Now (even if you unchecked the "remember my selection" checkbox from the MS Anti Spyware popup earlier) you can right-click on the same file again and select the "Notepad++" option and it will open up correctly in Notepad++ without running the script.

      PLEASE NOTE: This is the same behavior for .VBS files as well.

      This is really strange but I hope we found the culprit...Microsoft AntiSpyware.

      Let me know if you need any more information.

      Thanks,
      Paul (pmgower@yahoo.com)