"Launch on User Logon" Issue

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
stevehealy
OpenVpn Newbie
Posts: 1
Joined: Tue Aug 24, 2021 2:25 pm

"Launch on User Logon" Issue

Post by stevehealy » Tue Aug 24, 2021 2:33 pm

Hi there, hoping I can get some help or guidance on what I may be doing wrong.

I have an OpenVPN 2.5.3 install we are pushing out to end-users which uses the "ADDLOCAL" switches and it works almost perfectly:
msiexec /i C:\temp\OpenVPN-2.5.3-I601-amd64.msi ADDLOCAL=OpenVPN.GUI,OpenVPN.Service,OpenSSL,OpenVPN,OpenVPN.GUI.OnLogon,Drivers.TAPWindows6,Drivers,Drivers.Wintun /norestart

Everything appears to work as it should, except the "OpenVPN.GUI.OnLogon" option. When going into the GUI settings after install, this box remains unchecked and must be manually set. If there was an older version of OpenVPN installed that had this option checked in the settings already, it stays. However if its a new install, or installing over top of an existing install that did not have that option checked, it does not get selected even though that "OpenVPN.GUI.OnLogon" is present.

I was hoping there may be some entry in the registry I could change/add but nothing sticks out to me.

Any insights? Thanks!

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: "Launch on User Logon" Issue

Post by TinCanTech » Tue Aug 24, 2021 8:16 pm

FYI: You are not using Openvpn-Connect for Windows - Topic moved

This is from the GUI developer:
That msiexec command should work, but note that the registry entry for "run at logon" for each user is created when they login the next time. Users who are logged in when the installation happens will not see the setting right away. Except, possibly, the installing user.

The setting is added using the "active setup" feature of Windows by creating an entry in HKLM (see below) with a one-time setup command to run when users log in. To troubleshoot, check whether the following registry key is being created by the installer:

HKLM\Software\Microsoft\Active Setup\Installed Components\<ProductCode>

where product code for OpenVPN is something like {E5931AF4-2A8F-48A5-AFC8-460348F480E8} -- the last 13 bytes are changed for each release, the prefix part is fixed. This key will contain values like:
  • Installed = 0 or 1 (changes to 0 when uninstalled)
  • Stubpath = the command run when user logs in
    Typically: reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /f /v OPENVPN-GUI /t REG_SZ /d "C:\Program Files\OpenVPN\bin\openvpn-gui.exe"
  • Version = <a low number incremented each time msiexec is run>
The version should automatically increment each time msiexec is run, the command in stubpath should change to "reg delete....." when uninstalled, "reg add .." when installed etc.

There could be old entries (with different ProductCode) from installation of previous versions which is okay as Windows will ignore them.
Hope it helps.

Post Reply