aspose file tools*
The moose likes General Computing and the fly likes Log files no longer opening in Notepad++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Log files no longer opening in Notepad++" Watch "Log files no longer opening in Notepad++" New topic
Author

Log files no longer opening in Notepad++

J Miller
Ranch Hand

Joined: Oct 21, 2010
Posts: 67
Wasn't sure where else to put this, so I thought I'd start here. I work on a JSF project, and we view the server log directory using a web browser. Whenever I click on a log file, it opens up directly in IE. It used to open in Notepad++, which is what I prefer. I believe it changed during one of our IE upgrades, but I can't figure out how to change it back. I've done the whole Control Panel > Default Programs thing, and my file association is set up correctly:



This has happened to everybody on the team. I can't find any options in IE to change it, and all my google searches point me back to the file association. Anybody got any ideas? We're using IE10 by default, but the same thing happens in Chrome.
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1822
    
    7

If you open regedit and look at HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command, what is its associated value? It should be the full and correct path to the notepad++ executable.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

You could also try, in Notepad**, to unassociate the .log extension and the associate it again. That might fix up the registry. If that doesn't work, you'll have to track down the problems in the registry. I'd start at HKEY_CLASSES_ROOT\.log


JBoss In Action
J Miller
Ranch Hand

Joined: Oct 21, 2010
Posts: 67
Thanks for the replies. I looked at my registry, in the location you mentioned. The value is set to:

"C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"

This is the location of my Notepad++ install, though I'm not sure what the "%1" means.

When I go to my settings within Notepad++, it doesn't show as being associated with anything:



I can select Notepad under Supported exts, click .log, and click the arrow to move it over to 'Registered exts', then close. If I reopen the settings, the change will still be there, but if I close Notepad++ and reopen it, the changes are lost. Strange. I then tried uninstalling and reinstalling the program. Doesn't appear to have made any difference.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

The %1 refers to the file to that extension. The % notation is commonly used in scripts when referring to passed parameters.

What version of Windows are you running? On my Win8 laptop, Notepad++ also doesn't show the file associations after restart unless I run Notepad++ as an administrator.
J Miller
Ranch Hand

Joined: Oct 21, 2010
Posts: 67
I'm on Windows 7 Enterprise Edition, SP1, and Notepad++ version 6.6.2.

Since you mentioned running as an administrator, mine seems to behave the same as yours. If I right-click and run as administrator, when I go into the preferences > File Associations, it has my .log saved. However, if I close it and reopen it normally, it doesn't. I tried having Windows always run Notepad++ as an administrator, but all that did was present me with the security notification every time I tried to open it, and logs still just open in IE.
 
Consider Paul's rocket mass heater.
 
subject: Log files no longer opening in Notepad++