Closed XFox111 closed 9 months ago
In version 0.2.1, WireSockUI is capable of operating both as an Administrator and as a non-Administrator. It can be configured to autostart in either mode, though the methods for setting this up differ. Consequently, there's a possibility that both autostart methods could be activated simultaneously. For instance, you might first run it as a non-administrator, enable autostart, exit, and then run it again as an administrator, enabling autostart once more. Both settings can be disabled following the same procedure used to enable them.
Ah, that makes sense. But it's still rather confusing though. It would be better to have some unified mechanism instead to prevent double startup. Or at least make them check for each other. Because this can lead to a bunch of different use cases where the issue can occur.
When WireSockUI operates under a user account, it lacks access to the Task Manager, which restricts its control capabilities. However, by running it in Admin mode, where the necessary permissions are available, I can verify and, if needed, disable the autostart set up for the user account. I'll consider this approach further.
Version 0.2.4 partially addressed an issue, but a small problem persists: WireSockUI might launch twice if autostart is initially enabled in Admin mode and subsequently in non-Admin mode. This occurs because, in non-Admin mode, the application lacks sufficient permissions to determine if a Task Scheduler task already exists.
Yeah, but I think it's a minor issue, since elevated version on launch will override startup entry of non-elevated one, and the next time it will do okay (unless non-admin instance will always launch first).
Though, there might be another approach: you can check for duplicate startup entries before checking if another instance is running. So, in that case, even there's another non-admin instance is running, the elevated instance at least will remove duplicate startup entry, resolving issue for the next startup.
Starting with version 0.2.5, users will not have the ability to modify Autorun settings if they have been enabled by an Administrator. This change ensures that the Autorun configurations set by an Admin user remain secure and unaltered by other users.
Description
I've noticed that after 0.2.1 update WireSockUI tries to launch twice during Windows Startup - first time it launches normally, the second time it raises UAC prompt and then terminates because there's an instance running already.
Reproduction steps
Note: Clean installation is probably required for this repro
Expected behavior
WireSockUI should start only once on Windows startup.
System info
Additional context
I believe that this is because v0.2.1 has migrated from a startup shortcut at
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
(which didn't really work on my machine) to a proper entry in Task Scheduler and the shortcut was never removed, causing it to launch first time via TS, and then via this startup shortcut. After manually removing the shortcut, the issue has been fixed.