Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.9k
stars
91
forks
source link
schedule_autostart_task.ps1 regex does not work when PS language is JA #4
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?
This part requires the system language is English, because the regex has
TaskName
literal. However, when OS language settings is Japanese, theschtasks
command puts something like this:How about just removing
TaskName:
because\s+\\{{TASK_NAME}}
is enough to identify the newly registered task?