0

I've associated batch files with Notepad++ on my work Windows 7 machine, but I need to execute some scripts when I log on (which I'm attempting to do via the Local Group Policy Editor).

Instead of executing the specified script, Windows simply opens the batch files with Notepad++.

Is there an automated way to execute these files when I log on, WITHOUT removing the file association with Notepad++?

2 Answers2

2

You told the OS to open batch files with Notepad, it's doing so. This is how Windows works.

You'll need to change the association back to what it should be for the login scripting to run.

Some alternative ways to open batch files in Notepad++:

  1. Right-click the Batch file and select Edit in Notepad++.
  2. Open Notepad++ and drag the batch file you want to edit onto it.
  3. Open Notepad++ and use File -> Open.
  4. Create a shortcut to Notepad++ someplace accessible, and drag the batch file onto the shortcut.
2

If you change xyz.bat to xyz.cmd then double clicking it will run it normally. If you change your startup bat files to cmd files it should work.

(I haven't tested it. I do what Techie007 suggested.)