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

Awake - issue with path when run from cmd with -c flag #22679

Closed
kanlukasz opened this issue Dec 9, 2022 · 3 comments
Closed

Awake - issue with path when run from cmd with -c flag #22679

kanlukasz opened this issue Dec 9, 2022 · 3 comments
Assignees
Labels
Issue-Bug Something isn't working Product-Awake Issues regarding the PowerToys Awake utility Status-Reproducible This issue was reproduced by a maintainer

Comments

@kanlukasz
Copy link

Microsoft PowerToys version

0.65.0

Installation method

GitHub

Running as admin

Yes

Area(s) with issue?

Awake

Steps to reproduce

I'd like to run Awake as a standalone app, but with a blue cup icon in the system tray.
To achieve this, I'm trying to run it with the -c flag.

My steps:

  • open Terminal as admin
  • type cd C:\ (for example)
  • then type "C:\Program Files\PowerToys\modules\Awake\PowerToys.Awake.exe" -c

The above command returns:

[2022-12-09 18:38:29.4808 INFO] The value for --use-pt-config is: True
[2022-12-09 18:38:29.4808 INFO] The value for --display-on is: False
[2022-12-09 18:38:29.4808 INFO] The value for --time-limit is: 0
[2022-12-09 18:38:29.4808 INFO] The value for --pid is: 0
[2022-12-09 18:38:29.4808 INFO] There was a problem with the configuration file. Make sure it exists.
Could not find a part of the path 'C:\modules\awake\images\awake.ico'.

As you can see, something is wrong with the path ---> C:\modules\awake\images\awake.ico


If i type:

  • cd "C:\Program Files\PowerToys\" && "modules\Awake\PowerToys.Awake.exe" -c
    all works ok
[2022-12-09 18:43:34.1685 INFO] The value for --use-pt-config is: True
[2022-12-09 18:43:34.1685 INFO] The value for --display-on is: False
[2022-12-09 18:43:34.1685 INFO] The value for --time-limit is: 0
[2022-12-09 18:43:34.1685 INFO] The value for --pid is: 0
[2022-12-09 18:43:34.1815 INFO] Reading configuration file: C:\Users\<username>\AppData\Local\Microsoft\PowerToys\Awake\settings.json
[2022-12-09 18:43:34.1815 INFO] Setting up the tray.
[2022-12-09 18:43:34.2231 INFO] Identified custom time shortcuts for the tray: 0
[2022-12-09 18:43:34.2231 INFO] Operating in passive mode (computer's standard power plan). No custom keep awake settings enabled.

✔️ Expected Behavior

I think is should work with full path too

❌ Actual Behavior

See "Steps to reproduce"

Other Software

No response

@kanlukasz kanlukasz added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Dec 9, 2022
@crutkas
Copy link
Member

crutkas commented Dec 9, 2022

@dend does awake's -c make some file path assumptions that everything is running off runner?

@crutkas crutkas added Product-Awake Issues regarding the PowerToys Awake utility Status-Reproducible This issue was reproduced by a maintainer and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Dec 9, 2022
@dend dend self-assigned this Feb 16, 2023
@dend
Copy link
Collaborator

dend commented Feb 18, 2023

Actually, I can repro this. Should be fixed in #24183.

@dend
Copy link
Collaborator

dend commented Apr 17, 2023

Should be fixed with latest release.

@dend dend closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Product-Awake Issues regarding the PowerToys Awake utility Status-Reproducible This issue was reproduced by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants