[GH-ISSUE #50] Error on running script "You cannot call a method on a null-valued expression." #45

Open
opened 2026-03-04 12:24:11 +03:00 by kerem · 1 comment
Owner

Originally created by @axxox on GitHub (Oct 13, 2022).
Original GitHub issue: https://github.com/cascadium/wsl-windows-toolbar-launcher/issues/50

Running on windows 10; WSL2

nauta@OW-168-wsl:/mnt/c/Users/uuu/wsl-windows-toolbar-launcher$ python3 wsl_windows_toolbar.py
2022-10-13 11:17:18,461[INFO]: distribution = 'Ubuntu-20.04'
2022-10-13 11:17:18,461[INFO]: user = 'nauta'
2022-10-13 11:17:18,461[INFO]: confirm_yes = False
2022-10-13 11:17:18,461[INFO]: menu_file = '/etc/xdg/menus/gnome-applications.menu'
2022-10-13 11:17:18,461[INFO]: wsl_executable = 'C:\Windows\System32\wsl.exe'
2022-10-13 11:17:18,461[INFO]: target_name = 'WSL'
2022-10-13 11:17:18,461[INFO]: preferred_theme = 'Adwaita'
2022-10-13 11:17:18,461[INFO]: alternative_theme = '('Papirus', 'Humanity', 'elementary-xfce')'
2022-10-13 11:17:18,461[INFO]: jinja_template_batch = 'None'
2022-10-13 11:17:18,461[INFO]: jinja_template_shell = 'None'
2022-10-13 11:17:18,462[INFO]: rc_file = '/home/nauta/.bashrc'
2022-10-13 11:17:18,462[INFO]: has_imagemagick = True
2022-10-13 11:17:18,462[INFO]: has_cairosvg = True
2022-10-13 11:17:18,462[INFO]: launch_directory = '/home/nauta'
2022-10-13 11:17:18,462[INFO]: batch_encoding = 'None'
2022-10-13 11:17:18,462[INFO]: use_batch_newline_crlf = False
2022-10-13 11:17:18,462[INFO]: shortcut_suffix = ' (WSL)'
2022-10-13 11:17:18,462[INFO]: install_directory = '/mnt/c/Users/uuu/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/WSL Windows Toolbar/WSL'
2022-10-13 11:17:18,462[INFO]: metadata_directory = '/mnt/c/Users/uuu/.config/wsl-windows-toolbar-launcher/metadata/WSL'
2022-10-13 11:17:18,462[INFO]: For full list of options available, call script again with --help
2022-10-13 11:17:18,462[INFO]: This script will write to the above locations if it can, but giving final chance to chicken out.
Press <enter> to continue or ctrl+c to abort. [y/N]: y
2022-10-13 11:17:27,492[INFO]: Creating menu item for: Accessories/Byobu Terminal
= : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ = New-Object -ComObject WScript.Shell
+ ~
    + CategoryInfo          : ObjectNotFound: (=:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You cannot call a method on a null-valued expression.
At line:1 char:127
+ ... ript.Shell; $s = $ws.CreateShortcut("C:\Users\uuu\AppData\Roaming\M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

The property 'TargetPath' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:284
+ ... (WSL).lnk");$s.TargetPath = "C:\Users\uuu\.config\wsl-windows-toolb ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'Arguments' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:398
+ ... etadata\WSL\Accessories\Byobu Terminal.bat";$s.Arguments = "";$s.Desc ...
+                                                 ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'Description' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:416
+ ... uments = "";$s.Description = "Advanced Command Line and Text Window M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'WorkingDirectory' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:481
+ ... nd Text Window Manager";$s.WorkingDirectory = "%USERPROFILE%";$s.Icon ...
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'IconLocation' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:519
+ ... ERPROFILE%";$s.IconLocation = "C:\Users\uuu\.config\wsl-windows-too ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

You cannot call a method on a null-valued expression.
At line:1 char:635
+ ... olbar-launcher\metadata\WSL\Accessories\Byobu Terminal.ico";$s.Save()
+                                                                 ~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

2022-10-13 11:17:30,925[INFO]: Creating menu item for: Accessories/Files
= : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ = New-Object -ComObject WScript.Shell
+ ~
    + CategoryInfo          : ObjectNotFound: (=:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You cannot call a method on a null-valued expression.
At line:1 char:127
+ ... ript.Shell; $s = $ws.CreateShortcut("C:\Users\uuu\AppData\Roaming\M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

The property 'TargetPath' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:275
+ ... r\WSL\Accessories\Files (WSL).lnk");$s.TargetPath = "wscript";$s.Argu ...
+                                         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'Arguments' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:301
+ ... = "wscript";$s.Arguments = "`"C:\Users\uuu\.config\wsl-windows-tool ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'Description' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:498
+ ... ies\Files.bat`"";$s.Description = "Access and organize files";$s.Work ...
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'WorkingDirectory' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:543
+ ... ess and organize files";$s.WorkingDirectory = "%USERPROFILE%";$s.Icon ...
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'IconLocation' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:581
+ ... ERPROFILE%";$s.IconLocation = "C:\Users\uuu\.config\wsl-windows-too ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

You cannot call a method on a null-valued expression.
At line:1 char:688
+ ... indows-toolbar-launcher\metadata\WSL\Accessories\Files.ico";$s.Save()
+                                                                 ~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
Originally created by @axxox on GitHub (Oct 13, 2022). Original GitHub issue: https://github.com/cascadium/wsl-windows-toolbar-launcher/issues/50 Running on windows 10; WSL2 ``` nauta@OW-168-wsl:/mnt/c/Users/uuu/wsl-windows-toolbar-launcher$ python3 wsl_windows_toolbar.py 2022-10-13 11:17:18,461[INFO]: distribution = 'Ubuntu-20.04' 2022-10-13 11:17:18,461[INFO]: user = 'nauta' 2022-10-13 11:17:18,461[INFO]: confirm_yes = False 2022-10-13 11:17:18,461[INFO]: menu_file = '/etc/xdg/menus/gnome-applications.menu' 2022-10-13 11:17:18,461[INFO]: wsl_executable = 'C:\Windows\System32\wsl.exe' 2022-10-13 11:17:18,461[INFO]: target_name = 'WSL' 2022-10-13 11:17:18,461[INFO]: preferred_theme = 'Adwaita' 2022-10-13 11:17:18,461[INFO]: alternative_theme = '('Papirus', 'Humanity', 'elementary-xfce')' 2022-10-13 11:17:18,461[INFO]: jinja_template_batch = 'None' 2022-10-13 11:17:18,461[INFO]: jinja_template_shell = 'None' 2022-10-13 11:17:18,462[INFO]: rc_file = '/home/nauta/.bashrc' 2022-10-13 11:17:18,462[INFO]: has_imagemagick = True 2022-10-13 11:17:18,462[INFO]: has_cairosvg = True 2022-10-13 11:17:18,462[INFO]: launch_directory = '/home/nauta' 2022-10-13 11:17:18,462[INFO]: batch_encoding = 'None' 2022-10-13 11:17:18,462[INFO]: use_batch_newline_crlf = False 2022-10-13 11:17:18,462[INFO]: shortcut_suffix = ' (WSL)' 2022-10-13 11:17:18,462[INFO]: install_directory = '/mnt/c/Users/uuu/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/WSL Windows Toolbar/WSL' 2022-10-13 11:17:18,462[INFO]: metadata_directory = '/mnt/c/Users/uuu/.config/wsl-windows-toolbar-launcher/metadata/WSL' 2022-10-13 11:17:18,462[INFO]: For full list of options available, call script again with --help 2022-10-13 11:17:18,462[INFO]: This script will write to the above locations if it can, but giving final chance to chicken out. Press <enter> to continue or ctrl+c to abort. [y/N]: y 2022-10-13 11:17:27,492[INFO]: Creating menu item for: Accessories/Byobu Terminal = : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell ing of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + = New-Object -ComObject WScript.Shell + ~ + CategoryInfo : ObjectNotFound: (=:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException You cannot call a method on a null-valued expression. At line:1 char:127 + ... ript.Shell; $s = $ws.CreateShortcut("C:\Users\uuu\AppData\Roaming\M ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull The property 'TargetPath' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:284 + ... (WSL).lnk");$s.TargetPath = "C:\Users\uuu\.config\wsl-windows-toolb ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Arguments' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:398 + ... etadata\WSL\Accessories\Byobu Terminal.bat";$s.Arguments = "";$s.Desc ... + ~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Description' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:416 + ... uments = "";$s.Description = "Advanced Command Line and Text Window M ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'WorkingDirectory' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:481 + ... nd Text Window Manager";$s.WorkingDirectory = "%USERPROFILE%";$s.Icon ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'IconLocation' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:519 + ... ERPROFILE%";$s.IconLocation = "C:\Users\uuu\.config\wsl-windows-too ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound You cannot call a method on a null-valued expression. At line:1 char:635 + ... olbar-launcher\metadata\WSL\Accessories\Byobu Terminal.ico";$s.Save() + ~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull 2022-10-13 11:17:30,925[INFO]: Creating menu item for: Accessories/Files = : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell ing of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + = New-Object -ComObject WScript.Shell + ~ + CategoryInfo : ObjectNotFound: (=:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException You cannot call a method on a null-valued expression. At line:1 char:127 + ... ript.Shell; $s = $ws.CreateShortcut("C:\Users\uuu\AppData\Roaming\M ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull The property 'TargetPath' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:275 + ... r\WSL\Accessories\Files (WSL).lnk");$s.TargetPath = "wscript";$s.Argu ... + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Arguments' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:301 + ... = "wscript";$s.Arguments = "`"C:\Users\uuu\.config\wsl-windows-tool ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Description' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:498 + ... ies\Files.bat`"";$s.Description = "Access and organize files";$s.Work ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'WorkingDirectory' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:543 + ... ess and organize files";$s.WorkingDirectory = "%USERPROFILE%";$s.Icon ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'IconLocation' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:581 + ... ERPROFILE%";$s.IconLocation = "C:\Users\uuu\.config\wsl-windows-too ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound You cannot call a method on a null-valued expression. At line:1 char:688 + ... indows-toolbar-launcher\metadata\WSL\Accessories\Files.ico";$s.Save() + ~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull ```
Author
Owner

@axxox commented on GitHub (Oct 13, 2022):

running wsl-windows-toolbar also generates errors:

nauta@OW-168-wsl:~$ wsl-windows-toolbar
2022-10-13 11:25:37,925[INFO]: distribution = Ubuntu-20.04
2022-10-13 11:25:37,925[INFO]: user = nauta
2022-10-13 11:25:37,925[INFO]: confirm_yes = False
2022-10-13 11:25:37,925[INFO]: menu_file = /etc/xdg/menus/gnome-applications.menu
2022-10-13 11:25:37,925[INFO]: wsl_executable = C:\Windows\System32\wsl.exe
2022-10-13 11:25:37,925[INFO]: target_name = WSL
2022-10-13 11:25:37,925[INFO]: preferred_theme = Adwaita
2022-10-13 11:25:37,925[INFO]: alternative_theme = ('Papirus', 'Humanity', 'elementary-xfce')
2022-10-13 11:25:37,925[INFO]: jinja_template_batch = None
2022-10-13 11:25:37,926[INFO]: jinja_template_shell = None
2022-10-13 11:25:37,926[INFO]: rc_file = /home/nauta/.bashrc
2022-10-13 11:25:37,926[INFO]: has_imagemagick = True
2022-10-13 11:25:37,926[INFO]: has_cairosvg = True
2022-10-13 11:25:37,926[INFO]: launch_directory = /home/nauta
2022-10-13 11:25:37,926[INFO]: batch_encoding = None
2022-10-13 11:25:37,926[INFO]: use_batch_newline_crlf = False
2022-10-13 11:25:37,926[INFO]: install_directory = /mnt/c/Users/uuu/.config/wsl-windows-toolbar-launcher/menus/WSL
2022-10-13 11:25:37,926[INFO]: metadata_directory = /mnt/c/Users/uuu/.config/wsl-windows-toolbar-launcher/metadata/WSL
2022-10-13 11:25:37,926[INFO]: For full list of options available, call script again with --help
2022-10-13 11:25:37,926[INFO]: This script will write to the above locations if it can, but giving final chance to chicken out.
Press <enter> to continue or ctrl+c to abort.
2022-10-13 11:25:39,174[INFO]: Creating menu item for: Accessories/Byobu Terminal
= : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ = New-Object -ComObject WScript.Shell
+ ~
    + CategoryInfo          : ObjectNotFound: (=:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You cannot call a method on a null-valued expression.
At line:1 char:127
+ ... ript.Shell; $s = $ws.CreateShortcut("C:\Users\uuu\.config\wsl-windo ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

The property 'TargetPath' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:247
+ ... minal.lnk");$s.TargetPath = "C:\Users\uuu\.config\wsl-windows-toolb ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'Arguments' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:361
+ ... etadata\WSL\Accessories\Byobu Terminal.bat";$s.Arguments = "";$s.Desc ...
+                                                 ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'Description' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:379
+ ... uments = "";$s.Description = "Advanced Command Line and Text Window M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'WorkingDirectory' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:444
+ ... nd Text Window Manager";$s.WorkingDirectory = "%USERPROFILE%";$s.Icon ...
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'IconLocation' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:482
+ ... ERPROFILE%";$s.IconLocation = "C:\Users\uuu\.config\wsl-windows-too ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

You cannot call a method on a null-valued expression.
At line:1 char:598
+ ... olbar-launcher\metadata\WSL\Accessories\Byobu Terminal.ico";$s.Save()
+                                                                 ~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
<!-- gh-comment-id:1277308337 --> @axxox commented on GitHub (Oct 13, 2022): running `wsl-windows-toolbar` also generates errors: ``` nauta@OW-168-wsl:~$ wsl-windows-toolbar 2022-10-13 11:25:37,925[INFO]: distribution = Ubuntu-20.04 2022-10-13 11:25:37,925[INFO]: user = nauta 2022-10-13 11:25:37,925[INFO]: confirm_yes = False 2022-10-13 11:25:37,925[INFO]: menu_file = /etc/xdg/menus/gnome-applications.menu 2022-10-13 11:25:37,925[INFO]: wsl_executable = C:\Windows\System32\wsl.exe 2022-10-13 11:25:37,925[INFO]: target_name = WSL 2022-10-13 11:25:37,925[INFO]: preferred_theme = Adwaita 2022-10-13 11:25:37,925[INFO]: alternative_theme = ('Papirus', 'Humanity', 'elementary-xfce') 2022-10-13 11:25:37,925[INFO]: jinja_template_batch = None 2022-10-13 11:25:37,926[INFO]: jinja_template_shell = None 2022-10-13 11:25:37,926[INFO]: rc_file = /home/nauta/.bashrc 2022-10-13 11:25:37,926[INFO]: has_imagemagick = True 2022-10-13 11:25:37,926[INFO]: has_cairosvg = True 2022-10-13 11:25:37,926[INFO]: launch_directory = /home/nauta 2022-10-13 11:25:37,926[INFO]: batch_encoding = None 2022-10-13 11:25:37,926[INFO]: use_batch_newline_crlf = False 2022-10-13 11:25:37,926[INFO]: install_directory = /mnt/c/Users/uuu/.config/wsl-windows-toolbar-launcher/menus/WSL 2022-10-13 11:25:37,926[INFO]: metadata_directory = /mnt/c/Users/uuu/.config/wsl-windows-toolbar-launcher/metadata/WSL 2022-10-13 11:25:37,926[INFO]: For full list of options available, call script again with --help 2022-10-13 11:25:37,926[INFO]: This script will write to the above locations if it can, but giving final chance to chicken out. Press <enter> to continue or ctrl+c to abort. 2022-10-13 11:25:39,174[INFO]: Creating menu item for: Accessories/Byobu Terminal = : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell ing of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + = New-Object -ComObject WScript.Shell + ~ + CategoryInfo : ObjectNotFound: (=:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException You cannot call a method on a null-valued expression. At line:1 char:127 + ... ript.Shell; $s = $ws.CreateShortcut("C:\Users\uuu\.config\wsl-windo ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull The property 'TargetPath' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:247 + ... minal.lnk");$s.TargetPath = "C:\Users\uuu\.config\wsl-windows-toolb ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Arguments' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:361 + ... etadata\WSL\Accessories\Byobu Terminal.bat";$s.Arguments = "";$s.Desc ... + ~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'Description' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:379 + ... uments = "";$s.Description = "Advanced Command Line and Text Window M ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'WorkingDirectory' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:444 + ... nd Text Window Manager";$s.WorkingDirectory = "%USERPROFILE%";$s.Icon ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound The property 'IconLocation' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:482 + ... ERPROFILE%";$s.IconLocation = "C:\Users\uuu\.config\wsl-windows-too ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound You cannot call a method on a null-valued expression. At line:1 char:598 + ... olbar-launcher\metadata\WSL\Accessories\Byobu Terminal.ico";$s.Save() + ~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wsl-windows-toolbar-launcher#45
No description provided.