Reorder command line arguments check and registry operations.

When openvpn is not installed, HKLM\Software\OpenVPN registry is missing,
however, it should not fail on running "openvpn-gui.exe --help". Such
usage might be useful for smoke testing, for example (build openvpn-gui.exe
on AppVeyor, run it, check whether window is shown or not)
pull/147/head
Ilya Shipitsin 2017-03-15 00:17:27 +05:00
parent cdb223f426
commit 191a6db2fb
1 changed files with 3 additions and 3 deletions

6
main.c
View File

@ -174,12 +174,12 @@ int WINAPI _tWinMain (HINSTANCE hThisInstance,
exit(1);
}
UpdateRegistry(); /* Checks version change and update keys/values */
GetRegistryKeys();
/* Parse command-line options */
ProcessCommandLine(&o, GetCommandLine());
UpdateRegistry(); /* Checks version change and update keys/values */
GetRegistryKeys();
EnsureDirExists(o.config_dir);
if (!CheckVersion()) {