Opened 12 years ago
Closed 3 years ago
#213 closed Bug / Defect (fixed)
OpenVPN GUI on 64-bit Windows (registry issue)
Reported by: | ProGOLD | Owned by: | Samuli Seppänen |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Generic / unclassified | Version: | OpenVPN 2.4.0 (Community Ed) |
Severity: | Patch Queue: New / awaiting ACK | Keywords: | GUI x86_64 nsis windows |
Cc: |
Description
Hello. My name is Kirill and I apologize for my English.
Creating an installer for my own VPN, based on OpenVPN, I found a bug with 64-bit Windows systems. The registry in 64-bit versions of Windows is divided into 32-bit and 64-bit keys. (http://support.microsoft.com/kb/305097/) So, OpenVPN registry keys are creating in HKLM/Software/Wow6432node/OpenVPN instead of HKLM/Software/OpenVPN. And OpenVPN GUI application does not take this into account. If OpenVPN was installed in default location (C:\Program Files (x86)\OpenVPN), I guess, GUI does not find registry keys, and it uses default values. Otherwise, it causes an error in CreateProcess? system call, because openvpn.exe does not exist in default folder.
If you have additional questions, I am ready to answer.
Thanks in advance.
Change History (10)
comment:1 Changed 11 years ago by
Keywords: | GUI x86_64 added; windows gui 64 removed |
---|---|
Owner: | set to Samuli Seppänen |
Priority: | major → minor |
Status: | new → assigned |
comment:2 Changed 11 years ago by
Keywords: | nsis windows added |
---|---|
Milestone: | release 2.2.2 → release 2.4 |
Status: | assigned → accepted |
comment:3 Changed 11 years ago by
In my combined installer i use the x64.nsh and if statements so it installs the regvalues correct.
In the "SecService?" section:
${If} ${RunningX64} SetRegView 64 ; set registry parameters for openvpnserv !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "config_dir" "$INSTDIR\config" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "config_ext" "${OPENVPN_CONFIG_EXT}" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "exe_path" "$INSTDIR\bin\openvpn.exe" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "log_dir" "$INSTDIR\log" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "priority" "NORMAL_PRIORITY_CLASS" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "log_append" "0" ${Else} SetRegView 32 ; set registry parameters for openvpnserv !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PACKAGE_NAME}" "config_dir" "$INSTDIR\config" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PACKAGE_NAME}" "config_ext" "${OPENVPN_CONFIG_EXT}" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PACKAGE_NAME}" "exe_path" "$INSTDIR\bin\openvpn.exe" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PACKAGE_NAME}" "log_dir" "$INSTDIR\log" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PACKAGE_NAME}" "priority" "NORMAL_PRIORITY_CLASS" !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PACKAGE_NAME}" "log_append" "0" ${EndIf}
And in the "-post" section:
; Store install folder in registry ${If} ${RunningX64} SetRegView 64 WriteRegStr HKLM "SOFTWARE\Wow6432Node\${PACKAGE_NAME}" "" "$INSTDIR" ${Else} SetRegView 32 WriteRegStr HKLM "SOFTWARE\${PACKAGE_NAME}" "" "$INSTDIR" ${EndIf}
And it works fine with OpenVPN-GUI 5.0.0.
Don't know about other versions of the OpenVPN-GUI.
comment:4 Changed 8 years ago by
There have been plenty of registry-related changes to OpenVPN-GUI. Please test one of the recent snapshot installers to see if this problem is still reproducible.
comment:5 follow-ups: 6 7 Changed 8 years ago by
Linked to: https://github.com/OpenVPN/openvpn-build/issues/49
These are the full details of this problem and as it has been outstanding for over three years ..
To reproduce (All actions are "Run as administrator"):
- Uninstall openvpn completely:
Run Openvpn Uninstall.exe
Delete registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Openvpn
- Install Openvpn (Use default settings)
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN] "config_dir"="C:\\Program Files\\OpenVPN\\config" "config_ext"="ovpn" "exe_path"="C:\\Program Files\\OpenVPN\\bin\\openvpn.exe" "log_dir"="C:\\Program Files\\OpenVPN\\log" "priority"="NORMAL_PRIORITY_CLASS" "log_append"="0" @="C:\\Program Files\\OpenVPN"
- Uninstall Openvpn Only:
Run Openvpn Uninstall.exe
Do not edit registryWindows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN] "config_dir"="C:\\Program Files\\OpenVPN\\config" "config_ext"="ovpn" "exe_path"="C:\\Program Files\\OpenVPN\\bin\\openvpn.exe" "log_dir"="C:\\Program Files\\OpenVPN\\log" "priority"="NORMAL_PRIORITY_CLASS" "log_append"="0" @="C:\\Program Files\\OpenVPN"
- Install Openvpn to a different path (eg: C:\#Tools)
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN] "config_dir"="C:\\Program Files\\OpenVPN\\config" "config_ext"="ovpn" "exe_path"="C:\\Program Files\\OpenVPN\\bin\\openvpn.exe" "log_dir"="C:\\Program Files\\OpenVPN\\log" "priority"="NORMAL_PRIORITY_CLASS" "log_append"="0" @="C:\\#Tools\\OpenVPN"
- Note
config_dir
,exe_path
andlog_dir
are not correct.
Extra Notes:
- The "readme" file: INSTALL-win32.txt even on 64bit
- Is it possible to set the "readme" to explicitly open "on top" of all other windows because it quite often opens below other windows.
- I Still do not like joint 32/64bit installer. Double the size of the download and for no good reason.
comment:6 Changed 8 years ago by
Replying to debbie10t:
- The "readme" file: INSTALL-win32.txt even on 64bit
Well, the architecture *is* called "WIN32" - even if 64bit. Not our decision. (The alternative is "WIN16").
- I Still do not like joint 32/64bit installer. Double the size of the download and for no good reason.
So, I take it you are volunteering to do all the extra work involved in building and testing two installers? Because "I do not like it" is not a very convincing argument for causing more work for other people.
comment:7 Changed 8 years ago by
Replying to debbie10t:
- Uninstall Openvpn Only:
Run Openvpn Uninstall.exe
Do not edit registry
Does "OpenVPN only" means that the service, openssl, lzo, etc. are not uninstalled? How did you do this? Looking at openvpn.nsi it looks like the Uninstall section is static (=remove everything, always).
- Install Openvpn to a different path (eg: C:\#Tools)
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN] "config_dir"="C:\\Program Files\\OpenVPN\\config" "config_ext"="ovpn" "exe_path"="C:\\Program Files\\OpenVPN\\bin\\openvpn.exe" "log_dir"="C:\\Program Files\\OpenVPN\\log" "priority"="NORMAL_PRIORITY_CLASS" "log_append"="0" @="C:\\#Tools\\OpenVPN"
This just a variant of "Value of exe_path in registry not updated during reinstall" issue you linked to.
Extra Notes:
- The "readme" file: INSTALL-win32.txt even on 64bit
Well this is indeed something that can be trivially fixed, now that the file is hosted in openvpn-build. How about issuing a PR?
- Is it possible to set the "readme" to explicitly open "on top" of all other windows because it quite often opens below other windows.
This would be good. I'm sure there is a way, I just don't know how complex it would be.
- I Still do not like joint 32/64bit installer. Double the size of the download and for no good reason.
The combined installer is only 1.66x the size of the old 64-bit installer, or 1.93x larger than the 32-bit installer. Significant increase indeed, but the total size (3724 KB) is still quite reasonable imho.
As for the actual benefits: people no longer have to figure out whether they need (or should have) a 32-bit or 64-bit version. For many this may not be an obvious choice. Plus support should a bit easier as we know in which registry the registry keys will be, and that usually OpenVPN is installed to C:\Program Files\OpenVPN. Also, as Gert said, testing procedures will be simplified a bit.
comment:8 Changed 3 years ago by
Milestone: | release 2.4 |
---|---|
Version: | OpenVPN 2.2.2 (Community Ed) → OpenVPN 2.4.0 (Community Ed) |
Can this be closed? It most certainly didn't hit "2.4.0 release"...
comment:9 Changed 3 years ago by
Closing this seems reasonable. The bug/issue seems to be related to people installing 32-bit version of OpenVPN with NSIS to 64-bit Windows. And that has not been easily possible in ages. Plus we've moved on to MSI.
comment:10 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
I will have a look at this and if necessary fix this before 2.4.