samhocevar / wincompose

🔣 Compose Key for Windows
http://wincompose.info/
Other
2.61k stars 82 forks source link

WinCompose 0.9.0 does not start on my machine #263

Open simonebaracchi opened 5 years ago

simonebaracchi commented 5 years ago

After installation, I can't see the icon in the tray, I can't use the compose key, and if I try to start it manually, a window appears and disappears very quickly.

I downgraded to 0.8.2 and it works with no issues.

I run Windows 10 Pro.

samhocevar commented 5 years ago

Thanks for the report. This is probably caused by the new installer which now installs a scheduled task instead of running wincompose.exe directly. Can you maybe help by telling me:

Thanks in advance!

darklajid commented 5 years ago

I just stumbled upon the same thing, but - before looking at tickets I uninstalled it completely and installed it again from scratch: Now it works.

Installing over the previous version (WinCompose-Setup-0.8.2.exe - good that I never clean up the downloads folder...) showed that exact behavior above: Nothing started.

samhocevar commented 5 years ago

@darklajid thanks for the additional information; can you tell me in what directory you install the software?

darklajid commented 5 years ago

The second installation was plain/default: Next, next, next.. So C:\Program Files\Wincompose it is.

For the previous version/the update: Unfortunately I can't be quite sure at this point. It's very likely that I put it on D (as in just replacing the drive letter, D:\Program Files\Wincompose), because that's a habit here of mine. System files, Windows etc. are on C:\

simonebaracchi commented 5 years ago

I installed it in D:\Program Files. I did not install it as administrator. Installing as administrator apparently fixes it.

Roukanken42 commented 5 years ago

Had same problem, admin rights during installation were problem: it didn't manage to setup the scheduled task (schtasks /tn wincompose returned error until installation with admin rights)

Otherwise I was installing to D:/Program Files, and the compose.exe launched directly, but not start menu shortcut

samhocevar commented 5 years ago

@simonebaracchi @kuko0411 thanks, admin rights is indeed a problem; most people don’t have this problem because they keep the default C:\Program Files location which has special permissions, causing the installer to ask for admin rights.

This will be fixed in 0.9.1.

wizonesolutions commented 5 years ago

I ran into this by:

I saw that the scheduled task was there, and I wonder if the second one is failing because it's trying to set it up again even though the first account has already set it up.

I'm not sure how to run it properly when I have two user accounts. The problem was that I didn't see a shortcut to it in the second account's start menu.

AnDeacracht commented 5 years ago

Same problem as the OP here. Installed it with admin rights into C:\Program Files\Wincompose on Windows 10.

mafanie commented 5 years ago

Same problem for me. Is there already some idea when Version 0.9.1 (mentioned in the comment on 22 Mar) will be available?

mafanie commented 5 years ago

It seems that this issue is still present in the last beta from August (WinCompose v0.9.1beta20190805), but the beta from April (WinCompose 0.9.1beta20190405) works for me as expected.

mafanie commented 4 years ago

I have to correct my last comment. Also the beta from April does not work as expected - it does not start at startup. But the portable version works (with some link in autostart).

h3x4d3c1m4l commented 4 years ago

@samhocevar I noticed the sched task has the "Start the task only if the computer is on AC power" flag set. This does not make sense and is possibly done by accident...

This might be related to this issue?

samhocevar commented 4 years ago

@h3x4d3c1m4l thanks for pointing this out! The installer should take care of this flag so I don’t understand what happened but it could be a clue. Could you maybe show the contents of C:\Windows\system32\Tasks\WinCompose file? (you need elevated privileges to access it)

h3x4d3c1m4l commented 4 years ago

Can't reproduce it at another Windows 10 notebook. On this machine it makes no difference if installed using AC power or no AC power 😕

Will have a look at the other notebook (where I noticed the AC power flag) soon!

h3x4d3c1m4l commented 4 years ago

@samhocevar It's still reproducable at my main notebook (using 0.9.2), please find the pastebin of the sched task here:

https://pastebin.com/FrrdjCRQ EDIT: screenshot of the sched task: https://i.imgur.com/rHJev4d.png This is really strange... the DisallowStartIfOnBatteries property has the value of false which is not what the Windows UI shows.

emongev commented 4 years ago

Both my computer at work and at home suffer from this.

dtaylor84 commented 4 years ago

I was going to open a new issue, but I think this is just another impact of the same root cause.

Manually starting WinCompose requires Admin access and triggers a UAC prompt.

Reproduction Steps

  1. Install WinCompose 0.9.4 (Windows 10; UAC enabled)
  2. Exit WinCompose using the notification icon context menu.
  3. Try to start WinCompose using the Start Menu icon.
  4. Get very confused by UAC prompt for "Task Scheduler Configuration Tool".
  5. a) Click "No" and WinCompose does not start. b) Click "Yes" and WinCompose does start (with a flash of a DOS box).
AeliusSaionji commented 4 years ago

Yeah- I too am grinding against wincompose now requiring administrative elevation to start.

I don't think this task scheduler approach is wise. Windows has a function for starting programs at login- why are we circumventing it?

andreasdotorg commented 3 years ago

Same issue on my machine. Windows 10 version 2004, WinCompose 0.9.4. I did install and try to run on a machine not connected to AC, FWIW.

schtasks says "In queue":

PS C:\Users\andre> schtasks /tn wincompose

Ordner: \
Aufgabenname                             Nächste Laufzeit       Status
======================================== ====================== ===============
wincompose                               Nicht zutreffend       In Warteschlang

Manually running wincompose from the installation directory works as expected. When I query the settings in detail, I see that DisallowStartIfOnBatteries is set to true.

PS C:\Program Files\WinCompose> schtasks /query /xml /tn wincompose
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2020-10-18T19:07:09</Date>
    <Author>HERIBERT\andre</Author>
    <URI>\wincompose</URI>
  </RegistrationInfo>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-21-3167933819-92884797-2937064841-1001</UserId>
      <LogonType>InteractiveToken</LogonType>
    </Principal>
  </Principals>
  <Settings>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <IdleSettings>
      <Duration>PT10M</Duration>
      <WaitTimeout>PT1H</WaitTimeout>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
  </Settings>
  <Triggers>
    <LogonTrigger>
      <StartBoundary>2020-10-18T19:07:00</StartBoundary>
    </LogonTrigger>
  </Triggers>
  <Actions Context="Author">
    <Exec>
      <Command>"C:\Program Files\WinCompose\wincompose.exe"</Command>
      <Arguments>/fromtask</Arguments>
    </Exec>
  </Actions>
</Task>
jannisbecker commented 3 years ago

Can confirm that unchecking "Disallow start if on batteries" in the windows scheduler fixes the issue on my laptop. I'm using 0.9.4

samhocevar commented 3 years ago

Yeah- I too am grinding against wincompose now requiring administrative elevation to start.

I don't think this task scheduler approach is wise. Windows has a function for starting programs at login- why are we circumventing it?

Unfortunately the Task Scheduler is the only way to start a program at login with elevated privileges without triggering a UAC screen. The reason elevated privileges are required is because keyboard events cannot be injected into a window with higher privileges (for instance: Visual Studio sometimes re-launches itself with elevated privileges in order to debug specific applications).

However the next version of WinCompose will also fall back to standard logon sequence launch if the Task Scheduler cannot be used.

AeliusSaionji commented 3 years ago

Yeah- I too am grinding against wincompose now requiring administrative elevation to start. I don't think this task scheduler approach is wise. Windows has a function for starting programs at login- why are we circumventing it?

Unfortunately the Task Scheduler is the only way to start a program at login with elevated privileges without triggering a UAC screen. The reason elevated privileges are required is because keyboard events cannot be injected into a window with higher privileges (for instance: Visual Studio sometimes re-launches itself with elevated privileges in order to debug specific applications).

However the next version of WinCompose will also fall back to standard logon sequence launch if the Task Scheduler cannot be used.

Good to know. I am aware of this limitation, but imo it would be wiser to have this as a non default option in the app's settings: "run as administrator for elevated programs".

After all, programs not being able to interact with elevated windows is a feature, not a bug, and the implications of a program that can send keystrokes being granted admin privs, by default, for all installs... that's creating a large attack vector for "just in case a program is elevated".