diff --git a/res/ShellExecAsUser.dll b/res/ShellExecAsUser.dll new file mode 100644 index 00000000..01a8c85a Binary files /dev/null and b/res/ShellExecAsUser.dll differ diff --git a/res/synergy.nsh b/res/synergy.nsh index 1fc04f8c..6dc4311b 100644 --- a/res/synergy.nsh +++ b/res/synergy.nsh @@ -246,9 +246,6 @@ SectionEnd Function .onInstSuccess ; start the GUI automatically. - Exec "$INSTDIR\synergy.exe" - - ; HACK: wait 5 secs for the GUI to take focus. - Sleep 5000 + ShellExecAsUser::ShellExecAsUser "" "$INSTDIR\synergy.exe" SW_SHOWNORMAL FunctionEnd