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

schedule_autostart_task.ps1 regex does not work when PS language is JA #4

Closed
tomykaira opened this issue Nov 9, 2021 · 1 comment
Closed

Comments

@tomykaira
Copy link

If ([bool](schtasks /query /fo list | Select-String -pattern "TaskName:\s+\\{{TASK_NAME}}" -quiet)) {

This part requires the system language is English, because the regex has TaskName literal.
However, when OS language settings is Japanese, the schtasks command puts something like this:

タスク名:        \StartWSL_Ubuntu_for_desktop-xxxxxx-tomyk

How about just removing TaskName: because \s+\\{{TASK_NAME}} is enough to identify the newly registered task?

@nullpo-head
Copy link
Owner

Thanks for the catch! I'll fix it today later. It also would be very helpful if you could send your local change as a PR.

nullpo-head added a commit that referenced this issue Nov 9, 2021
## Bug Fix
- Fix scheduling task was not working on Windows of non-English locale. (Fix #4)
nullpo-head added a commit that referenced this issue Nov 9, 2021
## Bug Fixes

- Fix scheduling task was not working on Windows of non-English locale. (Fix #4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants