Opened 9 years ago

Closed 8 years ago

#494 closed Bug / Defect (fixed)

OpenVPN GUI does not use file association handlers for log viewing & config editing

Reported by: gavin.js0 Owned by: Samuli Seppänen
Priority: trivial Milestone:
Component: Windows GUI Version:
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: windows
Cc: selva.nair@…

Description

With default file association handlers registered for .log and .ovpn set to Notepad++ when right-clicking the OpenVPN GUI system tray icon and selecting either "View Log" or "Edit Config" the standard Windows Notepad application is launched.

Change History (7)

comment:1 Changed 9 years ago by Samuli Seppänen

Keywords: windows volunteer added
Owner: set to Heiko Hund
Status: newassigned
Version: 2.2.2

comment:2 Changed 9 years ago by Samuli Seppänen

Keywords: volunteer removed
Owner: changed from Heiko Hund to Samuli Seppänen

Hmm, actually this might be related to the NSI script. I'll reassign this to myself and have a look...

comment:3 Changed 9 years ago by Samuli Seppänen

Status: assignedaccepted

comment:4 Changed 8 years ago by Samuli Seppänen

Cc: selva.nair@… added

I looked at this issue a bit. OpenVPN and OpenVPN-GUI store their own file associations in the registry. OpenVPN registers .ovpn as a file type, and by default uses notepad.exe for launching it. No other common file associations are created.

However, OpenVPN-GUI has registry values log_viewer and editor, which determine which program to use for viewing the logs and editing configs, respectively. These are set to notepad.exe by default, and I think you can change only change them by editing the registry directly. Being able to set these using OpenVPN-GUI would be nice, and simply using global editor would be even nicer.

comment:5 Changed 8 years ago by Selva Nair

We can use ShellExecute? to open config and log files with verb="edit" and fallback to notepad if that fails. I like this as we can then make log_viwer and editor not user configurable and ask the user to use file associations to set them instead.

One problem with this approach is that if the file is associated with a wrong executable it will get launched with unexpected side-effects.

comment:6 Changed 8 years ago by Samuli Seppänen

Selvanair has fixed this in not yet merged PR to openvpn-gui.

comment:7 Changed 8 years ago by Samuli Seppänen

Resolution: fixed
Status: acceptedclosed

And here is the pull request I was talking about.

Note: See TracTickets for help on using tickets.