Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry initialisation #24

Closed
ygoe opened this issue Feb 14, 2016 · 3 comments
Closed

Retry initialisation #24

ygoe opened this issue Feb 14, 2016 · 3 comments

Comments

@ygoe
Copy link

ygoe commented Feb 14, 2016

Not sure whether this still applies here. With older versions I often got the following error message after logon if T-Clock was configured to start immediately at logon:

"Failed to customize clock"

This happened when the logon took longer than usual and the desktop might have been started after the autorun programs. I assume that T-Clock tries to find the taskbar window once and will fail if it's not there. If that's still the case, I'd suggest a retry loop for some time (maybe one or two minutes) before showing the error message and failing. A simple loop calling Sleep(1000) should be enough.

I helped myself by not using autorun but a scheduled task which allows me to set a start delay of 15...30 seconds. This usually works but it's not the common way to autorun programs.

For a worry-free installer (see #23) I'd not recommend such complex things as scheduled tasks. Instead the built-in autorun feature should be used. To make that robust, this retry loop would be needed.

@White-Tiger
Copy link
Owner

Well... autorun programs are run by explorer which means that the desktop should exist already...
But I do know that it's quite weird that T-Clock can actually add itself to the explorer clock even when explorer is closed and/or started after T-Clock... so the message is at least misleading and it might be a good idea to show a different message which should automatically close once it's running and hooked..

Though I never had an auto start issue, not even in slow VMs.. like I said, the default auto start means that T-Clock is run by explorer.exe which should mean it'll start sometime after the desktop.

@ygoe
Copy link
Author

ygoe commented Feb 14, 2016

The delays I've observed are not reproducible and seem to relate to unusual problems during startup of the system. Maybe the actual issue can be tracked down by reverse-following the displayed error message.

All I know is that the error message does appear from time to time, and then the clock won't load at all. The average non-technical user (who does not know the Program Files folder in Explorer) will have to logoff and logon again, or restart the computer right away.

White-Tiger added a commit that referenced this issue Jan 28, 2018
…sically implemented #24)

this is a followup on 5714148
* simplified command line parsing (we don't need speed here)
* delayed Clock hooking until after command line got parsed (/exit doesn't flash the Clock anymore)
* retry initialization if T-Clock was started before the Explorer
* updated T-Clock Help.rtf to reflect changes (+ added missing note about /SEH)
@White-Tiger
Copy link
Owner

Now implemented in v2.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants