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.