Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

MS store update doesn't work on PowerShell core #656

Closed
PolpOnline opened this issue Feb 22, 2021 · 11 comments
Closed

MS store update doesn't work on PowerShell core #656

PolpOnline opened this issue Feb 22, 2021 · 11 comments

Comments

@PolpOnline
Copy link

PolpOnline commented Feb 22, 2021

What did you expect to happen?
Topgrade upgrades MS store apps correctly.

What actually happened?
Topgrade throws an error and asks to retry.

Additional details:

  • Which operating system or Linux distribution are you using?
    Windows 10
  • How did you install Topgrade?
    Via cargo install topgrade command (currently on Topgrade version 6.6.0, this issue affects all versions of Topgrade
    including the latest)
  • Why do you have sudo on Windows?
    Because I use this

Run topgrade --dry-run to see which commands Topgrade is running. If the command seems wrong and you know why please tell us so.
If the command seems fine try to run it yourself and tell us if you got a different result from Topgrade. (yes, I got a different result)

  • Output of topgrade --only microsoft_store --dry-run -v
PowerShell 7.1.2
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\tommy> topgrade --only microsoft_store --dry-run -v
2021-02-22T19:35:48.349Z DEBUG topgrade::config > Configuration at C:\Users\tommy\AppData\Roaming\topgrade.toml
2021-02-22T19:35:48.350Z DEBUG topgrade::config > Loaded configuration: ConfigFile { pre_commands: None, post_commands: None, commands: None, git_repos: None, predefined_git_repos: None, disable: None, ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, assume_yes: None, yay_arguments: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, bashit_branch: None, only: None, composer: None, brew: None, linux: None, git: None, windows: None, vagrant: None }
2021-02-22T19:35:48.350Z DEBUG topgrade > Version: 6.6.0
2021-02-22T19:35:48.350Z DEBUG topgrade > OS: x86_64-pc-windows-msvc
2021-02-22T19:35:48.351Z DEBUG topgrade > Args { inner: ["C:\Users\tommy\.cargo\bin\topgrade.exe", "--only", "microsoft_store", "--dry-run", "-v"] }
2021-02-22T19:35:48.351Z DEBUG topgrade > Binary path: Ok("C:\Users\tommy\.cargo\bin\topgrade.exe")
2021-02-22T19:35:48.351Z DEBUG topgrade > Self Update: false
2021-02-22T19:35:48.382Z DEBUG topgrade::utils > Detected "C:\Program Files\Git\cmd\git.EXE" as "git"
2021-02-22T19:35:48.444Z DEBUG topgrade::utils > Cannot find "doas"
2021-02-22T19:35:48.467Z DEBUG topgrade::utils > Detected "C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE" as "sudo"
2021-02-22T19:35:48.468Z DEBUG topgrade::utils > Detected "C:\Program Files\PowerShell\7\pwsh.EXE" as "pwsh"
2021-02-22T19:35:49.793Z TRACE topgrade::executor > Output of "C:\Program Files\PowerShell\7\pwsh.EXE" "-NoProfile" "-Command" "Split-Path $profile": Output { status: ExitStatus(ExitStatus(0)), stdout: "C:\Users\tommy\Documents\PowerShell\r\n", stderr: "" }
2021-02-22T19:35:49.794Z DEBUG topgrade::utils > Path "C:\Users\tommy\Documents\PowerShell" exists
2021-02-22T19:35:49.794Z DEBUG topgrade::runner > Step "Windows App Store"
2021-02-22T19:35:49.808Z DEBUG topgrade::utils > Detected "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE" as "powershell"

―― 20:35:49 - Microsoft Store ――――――――――――――――――――――――――――――――――――――――――――――――――
Updating Microsoft Store applications in the background
Dry running: C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE -NoProfile -Command (Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() > $null
2021-02-22T19:35:49.826Z DEBUG topgrade::utils > Path "C:\Users\tommy\AppData\Roaming\.emacs.d" doesn't exist
2021-02-22T19:35:49.827Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState is a git repository
2021-02-22T19:35:49.828Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
2021-02-22T19:35:49.922Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:35:49.924Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\DeskPins.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | IS_UNICODE, file_attributes: (empty), creation_time: 130688470900000000, access_time: 132490768850500407, write_time: 130688470900000000, file_size: 104960, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2015-02-19T19:18:10Z), modified_on: Some(2015-02-19T19:18:10Z), accessed_on: Some(2020-11-05T19:08:05.050Z) }, string_data: StringData { name_string: None, relative_path: Some("..\..\..\..\..\..\..\..\..\Program Files (x86)\DeskPins\deskpins.exe"), working_dir: Some("C:\Program Files (x86)\DeskPins"), command_line_arguments: None, icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 102, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 101, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Program Files (x86)\DeskPins\deskpins.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 42, offset: 197 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 190052219684104677698750403823881830639, offset: 197 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944290226809654305828898542], droid_birth: [235054023469330678890674588700100116664, 43674402351944290226809654305828898542] }), vista_and_above_idlist_props: None } }
2021-02-22T19:35:49.929Z DEBUG topgrade::steps::git > \?\C:\Program Files (x86)\DeskPins\deskpins.exe is a file. Checking \?\C:\Program Files (x86)\DeskPins
2021-02-22T19:35:49.929Z DEBUG topgrade::steps::git > Checking if \?\C:\Program Files (x86)\DeskPins is a git repository
2021-02-22T19:35:49.930Z DEBUG topgrade::steps::git > Transformed path to C:\Program Files (x86)\DeskPins
2021-02-22T19:35:50.014Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:35:50.015Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\espanso.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 132526203577470657, access_time: 132526203587376979, write_time: 132514956460000000, file_size: 8428544, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-12-16T19:25:57.747Z), modified_on: Some(2020-12-03T19:00:46Z), accessed_on: Some(2020-12-16T19:25:58.737Z) }, string_data: StringData { name_string: None, relative_path: Some("..\..\..\..\..\..\Local\Programs\espanso\espanso.exe"), working_dir: Some("C:\Users\tommy\AppData\Local\Programs\espanso"), command_line_arguments: Some("start"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 115, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 114, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Local\Programs\espanso\espanso.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: None, console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 191320649484052062574313519749765402492, offset: 58 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944431897804176000860584034], droid_birth: [235054023469330678890674588700100116664, 43674402351944431897804176000860584034] }), vista_and_above_idlist_props: None } }
2021-02-22T19:35:50.019Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Local\Programs\espanso\espanso.exe is a file. Checking \?\C:\Users\tommy\AppData\Local\Programs\espanso
2021-02-22T19:35:50.020Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\Programs\espanso is a git repository
2021-02-22T19:35:50.021Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\Programs\espanso
2021-02-22T19:35:50.108Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:35:50.110Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\MEGAsync.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_NAME | HAS_RELATIVE_PATH | IS_UNICODE, file_attributes: (empty), creation_time: 132442512280000000, access_time: 132444943320320001, write_time: 132442512280000000, file_size: 23463672, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-09-10T22:40:28Z), modified_on: Some(2020-09-10T22:40:28Z), accessed_on: Some(2020-09-13T18:12:12.032Z) }, string_data: StringData { name_string: Some("Start MEGAsync"), relative_path: Some("..\..\..\..\..\..\Local\MEGAsync\MEGAsync.exe"), working_dir: None, command_line_arguments: None, icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 108, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 107, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Local\MEGAsync\MEGAsync.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 4294967295, offset: 58 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 191320649484052062574313519749765402492, offset: 58 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944077720317880351009562010], droid_birth: [235054023469330678890674588700100116664, 43674402351944077720317880351009562010] }), vista_and_above_idlist_props: None } }
2021-02-22T19:35:50.114Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Local\MEGAsync\MEGAsync.exe is a file. Checking \?\C:\Users\tommy\AppData\Local\MEGAsync
2021-02-22T19:35:50.115Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\MEGAsync is a git repository
2021-02-22T19:35:50.115Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\MEGAsync
2021-02-22T19:35:50.202Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:35:50.203Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Telegram.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_NAME | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 132442405363616763, access_time: 132444027465982713, write_time: 132425724860000000, file_size: 68653160, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-09-10T19:42:16.361Z), modified_on: Some(2020-08-22T12:21:26Z), accessed_on: Some(2020-09-12T16:45:46.598Z) }, string_data: StringData { name_string: Some("Telegram autorun link.\nYou can disable autorun in Telegram settings."), relative_path: Some("..\..\..\..\..\Telegram Desktop\Telegram.exe"), working_dir: Some("C:\Users\tommy\AppData\Roaming\Telegram Desktop"), command_line_arguments: Some("-autostart"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 118, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 117, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Roaming\Telegram Desktop\Telegram.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: None, console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: None, property_store_props: Some(PropertyStoreDataBlock { block_size: 166, block_signature: 2684354569, property_store: [97, 0, 0, 0, 49, 83, 80, 83, 85, 40, 76, 159, 121, 159, 57, 75, 168, 208, 225, 212, 45, 225, 213, 243, 69, 0, 0, 0, 5, 0, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 84, 0, 101, 0, 108, 0, 101, 0, 103, 0, 114, 0, 97, 0, 109, 0, 46, 0, 84, 0, 101, 0, 108, 0, 101, 0, 103, 0, 114, 0, 97, 0, 109, 0, 68, 0, 101, 0, 115, 0, 107, 0, 116, 0, 111, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351943992717721186139175504375], droid_birth: [235054023469330678890674588700100116664, 43674402351943992717721186139175504375] }), vista_and_above_idlist_props: None } }
2021-02-22T19:35:50.209Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop\Telegram.exe is a file. Checking \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop
2021-02-22T19:35:50.209Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop is a git repository
2021-02-22T19:35:50.209Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Roaming\Telegram Desktop
2021-02-22T19:35:50.293Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:35:50.295Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\Documents\PowerShell is a git repository
2021-02-22T19:35:50.295Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\Documents\PowerShell
2021-02-22T19:35:50.384Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }

―― 20:35:50 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Windows App Store: OK
2021-02-22T19:35:50.394Z DEBUG topgrade::terminal > Desktop notification: Topgrade finished sucessfully
PS C:\Users\tommy>

  • Output of topgrade --only microsoft_store --dry-run
PowerShell 7.1.2
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\tommy> topgrade --only microsoft_store --dry-run

―― 20:32:40 - Microsoft Store ――――――――――――――――――――――――――――――――――――――――――――――――――
Updating Microsoft Store applications in the background
Dry running: C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE -NoProfile -Command (Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() > $null

―― 20:32:40 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Windows App Store: OK
PS C:\Users\tommy>

  • Output of topgrade --only microsoft_store -v
PowerShell 7.1.2
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\tommy> topgrade --only microsoft_store -v
2021-02-22T19:08:27.456Z DEBUG topgrade::config > Configuration at C:\Users\tommy\AppData\Roaming\topgrade.toml
2021-02-22T19:08:27.457Z DEBUG topgrade::config > Loaded configuration: ConfigFile { pre_commands: None, post_commands: None, commands: None, git_repos: None, predefined_git_repos: None, disable: None, ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, assume_yes: None, yay_arguments: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, bashit_branch: None, only: None, composer: None, brew: None, linux: None, git: None, windows: None, vagrant: None }
2021-02-22T19:08:27.458Z DEBUG topgrade > Version: 6.6.0
2021-02-22T19:08:27.459Z DEBUG topgrade > OS: x86_64-pc-windows-msvc
2021-02-22T19:08:27.459Z DEBUG topgrade > Args { inner: ["C:\Users\tommy\.cargo\bin\topgrade.exe", "--only", "microsoft_store", "-v"] }
2021-02-22T19:08:27.459Z DEBUG topgrade > Binary path: Ok("C:\Users\tommy\.cargo\bin\topgrade.exe")
2021-02-22T19:08:27.459Z DEBUG topgrade > Self Update: false
2021-02-22T19:08:27.493Z DEBUG topgrade::utils > Detected "C:\Program Files\Git\cmd\git.EXE" as "git"
2021-02-22T19:08:27.565Z DEBUG topgrade::utils > Cannot find "doas"
2021-02-22T19:08:27.593Z DEBUG topgrade::utils > Detected "C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE" as "sudo"
2021-02-22T19:08:27.594Z DEBUG topgrade::utils > Detected "C:\Program Files\PowerShell\7\pwsh.EXE" as "pwsh"
2021-02-22T19:08:29.104Z TRACE topgrade::executor > Output of "C:\Program Files\PowerShell\7\pwsh.EXE" "-NoProfile" "-Command" "Split-Path $profile": Output { status: ExitStatus(ExitStatus(0)), stdout: "C:\Users\tommy\Documents\PowerShell\r\n", stderr: "" }
2021-02-22T19:08:29.105Z DEBUG topgrade::utils > Path "C:\Users\tommy\Documents\PowerShell" exists
2021-02-22T19:08:29.105Z DEBUG topgrade::runner > Step "Windows App Store"
2021-02-22T19:08:29.117Z DEBUG topgrade::utils > Detected "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE" as "powershell"

―― 20:08:29 - Microsoft Store ――――――――――――――――――――――――――――――――――――――――――――――――――
Updating Microsoft Store applications in the background
2021-02-22T19:08:29.127Z DEBUG topgrade::executor > Running "C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE" "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE" "-NoProfile" "-Command" "(Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() > $null"
Get-WmiObject: The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
2021-02-22T19:08:34.317Z DEBUG topgrade::runner > Step "Windows App Store" failed: exit code: 1
2021-02-22T19:08:34.317Z DEBUG topgrade::terminal > Desktop notification: Windows App Store failed

Retry? (y)es/(N)o/(s)hell
2021-02-22T19:18:53.112Z DEBUG topgrade::utils > Path "C:\Users\tommy\AppData\Roaming\.emacs.d" doesn't exist
2021-02-22T19:18:53.114Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState is a git repository
2021-02-22T19:18:53.117Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
2021-02-22T19:18:53.278Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:18:53.283Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\DeskPins.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | IS_UNICODE, file_attributes: (empty), creation_time: 130688470900000000, access_time: 132490768850500407, write_time: 130688470900000000, file_size: 104960, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2015-02-19T19:18:10Z), modified_on: Some(2015-02-19T19:18:10Z), accessed_on: Some(2020-11-05T19:08:05.050Z) }, string_data: StringData { name_string: None, relative_path: Some("..\..\..\..\..\..\..\..\..\Program Files (x86)\DeskPins\deskpins.exe"), working_dir: Some("C:\Program Files (x86)\DeskPins"), command_line_arguments: None, icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 102, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 101, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Program Files (x86)\DeskPins\deskpins.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 42, offset: 197 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 190052219684104677698750403823881830639, offset: 197 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944290226809654305828898542], droid_birth: [235054023469330678890674588700100116664, 43674402351944290226809654305828898542] }), vista_and_above_idlist_props: None } }
2021-02-22T19:18:53.289Z DEBUG topgrade::steps::git > \?\C:\Program Files (x86)\DeskPins\deskpins.exe is a file. Checking \?\C:\Program Files (x86)\DeskPins
2021-02-22T19:18:53.290Z DEBUG topgrade::steps::git > Checking if \?\C:\Program Files (x86)\DeskPins is a git repository
2021-02-22T19:18:53.291Z DEBUG topgrade::steps::git > Transformed path to C:\Program Files (x86)\DeskPins
2021-02-22T19:18:53.387Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:18:53.389Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\espanso.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 132526203577470657, access_time: 132526203587376979, write_time: 132514956460000000, file_size: 8428544, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-12-16T19:25:57.747Z), modified_on: Some(2020-12-03T19:00:46Z), accessed_on: Some(2020-12-16T19:25:58.737Z) }, string_data: StringData { name_string: None, relative_path: Some("..\..\..\..\..\..\Local\Programs\espanso\espanso.exe"), working_dir: Some("C:\Users\tommy\AppData\Local\Programs\espanso"), command_line_arguments: Some("start"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 115, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 114, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Local\Programs\espanso\espanso.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: None, console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 191320649484052062574313519749765402492, offset: 58 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944431897804176000860584034], droid_birth: [235054023469330678890674588700100116664, 43674402351944431897804176000860584034] }), vista_and_above_idlist_props: None } }
2021-02-22T19:18:53.395Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Local\Programs\espanso\espanso.exe is a file. Checking \?\C:\Users\tommy\AppData\Local\Programs\espanso
2021-02-22T19:18:53.396Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\Programs\espanso is a git repository
2021-02-22T19:18:53.397Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\Programs\espanso
2021-02-22T19:18:53.487Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:18:53.489Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\MEGAsync.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_NAME | HAS_RELATIVE_PATH | IS_UNICODE, file_attributes: (empty), creation_time: 132442512280000000, access_time: 132444943320320001, write_time: 132442512280000000, file_size: 23463672, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-09-10T22:40:28Z), modified_on: Some(2020-09-10T22:40:28Z), accessed_on: Some(2020-09-13T18:12:12.032Z) }, string_data: StringData { name_string: Some("Start MEGAsync"), relative_path: Some("..\..\..\..\..\..\Local\MEGAsync\MEGAsync.exe"), working_dir: None, command_line_arguments: None, icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 108, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 107, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Local\MEGAsync\MEGAsync.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 4294967295, offset: 58 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 191320649484052062574313519749765402492, offset: 58 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944077720317880351009562010], droid_birth: [235054023469330678890674588700100116664, 43674402351944077720317880351009562010] }), vista_and_above_idlist_props: None } }
2021-02-22T19:18:53.493Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Local\MEGAsync\MEGAsync.exe is a file. Checking \?\C:\Users\tommy\AppData\Local\MEGAsync
2021-02-22T19:18:53.494Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\MEGAsync is a git repository
2021-02-22T19:18:53.494Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\MEGAsync
2021-02-22T19:18:53.592Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:18:53.595Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Telegram.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_NAME | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 132442405363616763, access_time: 132444027465982713, write_time: 132425724860000000, file_size: 68653160, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-09-10T19:42:16.361Z), modified_on: Some(2020-08-22T12:21:26Z), accessed_on: Some(2020-09-12T16:45:46.598Z) }, string_data: StringData { name_string: Some("Telegram autorun link.\nYou can disable autorun in Telegram settings."), relative_path: Some("..\..\..\..\..\Telegram Desktop\Telegram.exe"), working_dir: Some("C:\Users\tommy\AppData\Roaming\Telegram Desktop"), command_line_arguments: Some("-autostart"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 118, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 117, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Roaming\Telegram Desktop\Telegram.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: None, console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: None, property_store_props: Some(PropertyStoreDataBlock { block_size: 166, block_signature: 2684354569, property_store: [97, 0, 0, 0, 49, 83, 80, 83, 85, 40, 76, 159, 121, 159, 57, 75, 168, 208, 225, 212, 45, 225, 213, 243, 69, 0, 0, 0, 5, 0, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 84, 0, 101, 0, 108, 0, 101, 0, 103, 0, 114, 0, 97, 0, 109, 0, 46, 0, 84, 0, 101, 0, 108, 0, 101, 0, 103, 0, 114, 0, 97, 0, 109, 0, 68, 0, 101, 0, 115, 0, 107, 0, 116, 0, 111, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351943992717721186139175504375], droid_birth: [235054023469330678890674588700100116664, 43674402351943992717721186139175504375] }), vista_and_above_idlist_props: None } }
2021-02-22T19:18:53.602Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop\Telegram.exe is a file. Checking \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop
2021-02-22T19:18:53.603Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop is a git repository
2021-02-22T19:18:53.603Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Roaming\Telegram Desktop
2021-02-22T19:18:53.701Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-22T19:18:53.703Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\Documents\PowerShell is a git repository
2021-02-22T19:18:53.704Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\Documents\PowerShell
2021-02-22T19:18:53.798Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }

―― 20:18:53 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Windows App Store: FAILED
2021-02-22T19:18:53.809Z DEBUG topgrade::terminal > Desktop notification: Topgrade finished with errors
PS C:\Users\tommy>

@r-darwish
Copy link
Owner

Interesting. The step uses the Windows Powershell on purpose, regardless if Powershell Core is installed. We can also see the the output that it didn't use Powershell Core but used the Windows Powershell. I also use Powershell Core myself and don't experience this issue. What happens if you run Get-WmiObject from your Windows Powershell?

@PolpOnline
Copy link
Author

If I run Get-WmiObject the Windows PowerShell works just fine, also Topgrade works on that shell.

  • Output of topgrade --only microsoft_store -v in Windows PowerShell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\tommy> topgrade --only microsoft_store -v
2021-02-23T13:27:36.070Z DEBUG topgrade::config > Configuration at C:\Users\tommy\AppData\Roaming\topgrade.toml
2021-02-23T13:27:36.071Z DEBUG topgrade::config > Loaded configuration: ConfigFile { pre_commands: None, post_commands: None, commands: None, git_repos: None, predefined_git_repos: None, disable: None, ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, assume_yes: None, yay_arguments: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, bashit_branch: None, only: None, composer: None, brew: None, linux: None, git: None, windows: None, vagrant: None }
2021-02-23T13:27:36.072Z DEBUG topgrade > Version: 6.6.0
2021-02-23T13:27:36.072Z DEBUG topgrade > OS: x86_64-pc-windows-msvc
2021-02-23T13:27:36.072Z DEBUG topgrade > Args { inner: ["C:\Users\tommy\.cargo\bin\topgrade.exe", "--only", "microsoft_store", "-v"] }
2021-02-23T13:27:36.073Z DEBUG topgrade > Binary path: Ok("C:\Users\tommy\.cargo\bin\topgrade.exe")
2021-02-23T13:27:36.073Z DEBUG topgrade > Self Update: false
2021-02-23T13:27:36.106Z DEBUG topgrade::utils > Detected "C:\Program Files\Git\cmd\git.EXE" as "git"
2021-02-23T13:27:36.188Z DEBUG topgrade::utils > Cannot find "doas"
2021-02-23T13:27:36.215Z DEBUG topgrade::utils > Detected "C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE" as "sudo"
2021-02-23T13:27:36.255Z DEBUG topgrade::utils > Detected "C:\Program Files\PowerShell\7\pwsh.EXE" as "pwsh"
2021-02-23T13:27:37.633Z TRACE topgrade::executor > Output of "C:\Program Files\PowerShell\7\pwsh.EXE" "-NoProfile" "-Command" "Split-Path $profile": Output { status: ExitStatus(ExitStatus(0)), stdout: "C:\Users\tommy\Documents\PowerShell\r\n", stderr: "" }
2021-02-23T13:27:37.633Z DEBUG topgrade::utils > Path "C:\Users\tommy\Documents\PowerShell" exists
2021-02-23T13:27:37.634Z DEBUG topgrade::runner > Step "Windows App Store"
2021-02-23T13:27:37.647Z DEBUG topgrade::utils > Detected "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE" as "powershell"

―― 14:27:37 - Microsoft Store ――――――――――――――――――――――――――――――――――――――――――――――――――
Updating Microsoft Store applications in the background
2021-02-23T13:27:37.659Z DEBUG topgrade::executor > Running "C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE" "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE" "-NoProfile" "-Command" "(Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() > $null"

2021-02-23T13:28:37.985Z DEBUG topgrade::utils > Path "C:\Users\tommy\AppData\Roaming\.emacs.d" doesn't exist
2021-02-23T13:28:37.987Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState is a git repository
2021-02-23T13:28:37.987Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
2021-02-23T13:28:38.122Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-23T13:28:38.125Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\DeskPins.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | IS_UNICODE, file_attributes: (empty), creation_time: 130688470900000000, access_time: 132490768850500407, write_time: 130688470900000000, file_size: 104960, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2015-02-19T19:18:10Z), modified_on: Some(2015-02-19T19:18:10Z), accessed_on: Some(2020-11-05T19:08:05.050Z) }, string_data: StringData { name_string: None, relative_path: Some("..\..\..\..\..\..\..\..\..\Program Files (x86)\DeskPins\deskpins.exe"), working_dir: Some("C:\Program Files (x86)\DeskPins"), command_line_arguments: None, icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 102, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 101, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Program Files (x86)\DeskPins\deskpins.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 42, offset: 197 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 190052219684104677698750403823881830639, offset: 197 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944290226809654305828898542], droid_birth: [235054023469330678890674588700100116664, 43674402351944290226809654305828898542] }), vista_and_above_idlist_props: None } }
2021-02-23T13:28:38.130Z DEBUG topgrade::steps::git > \?\C:\Program Files (x86)\DeskPins\deskpins.exe is a file. Checking \?\C:\Program Files (x86)\DeskPins
2021-02-23T13:28:38.131Z DEBUG topgrade::steps::git > Checking if \?\C:\Program Files (x86)\DeskPins is a git repository
2021-02-23T13:28:38.132Z DEBUG topgrade::steps::git > Transformed path to C:\Program Files (x86)\DeskPins
2021-02-23T13:28:38.222Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-23T13:28:38.224Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\espanso.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 132526203577470657, access_time: 132526203587376979, write_time: 132514956460000000, file_size: 8428544, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-12-16T19:25:57.747Z), modified_on: Some(2020-12-03T19:00:46Z), accessed_on: Some(2020-12-16T19:25:58.737Z) }, string_data: StringData { name_string: None, relative_path: Some("..\..\..\..\..\..\Local\Programs\espanso\espanso.exe"), working_dir: Some("C:\Users\tommy\AppData\Local\Programs\espanso"), command_line_arguments: Some("start"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 115, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 114, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Local\Programs\espanso\espanso.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: None, console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 191320649484052062574313519749765402492, offset: 58 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944431897804176000860584034], droid_birth: [235054023469330678890674588700100116664, 43674402351944431897804176000860584034] }), vista_and_above_idlist_props: None } }
2021-02-23T13:28:38.230Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Local\Programs\espanso\espanso.exe is a file. Checking \?\C:\Users\tommy\AppData\Local\Programs\espanso
2021-02-23T13:28:38.230Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\Programs\espanso is a git repository
2021-02-23T13:28:38.231Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\Programs\espanso
2021-02-23T13:28:38.324Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-23T13:28:38.326Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\MEGAsync.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_NAME | HAS_RELATIVE_PATH | IS_UNICODE, file_attributes: (empty), creation_time: 132442512280000000, access_time: 132444943320320001, write_time: 132442512280000000, file_size: 23463672, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-09-10T22:40:28Z), modified_on: Some(2020-09-10T22:40:28Z), accessed_on: Some(2020-09-13T18:12:12.032Z) }, string_data: StringData { name_string: Some("Start MEGAsync"), relative_path: Some("..\..\..\..\..\..\Local\MEGAsync\MEGAsync.exe"), working_dir: None, command_line_arguments: None, icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 108, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 107, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Local\MEGAsync\MEGAsync.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 4294967295, offset: 58 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 191320649484052062574313519749765402492, offset: 58 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 206, block_signature: 2684354569, property_store: [137, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 109, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 52, 0, 48, 0, 51, 0, 55, 0, 53, 0, 57, 0, 49, 0, 54, 0, 48, 0, 53, 0, 45, 0, 57, 0, 51, 0, 48, 0, 57, 0, 51, 0, 50, 0, 57, 0, 57, 0, 53, 0, 45, 0, 51, 0, 52, 0, 48, 0, 56, 0, 50, 0, 48, 0, 48, 0, 51, 0, 48, 0, 50, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351944077720317880351009562010], droid_birth: [235054023469330678890674588700100116664, 43674402351944077720317880351009562010] }), vista_and_above_idlist_props: None } }
2021-02-23T13:28:38.331Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Local\MEGAsync\MEGAsync.exe is a file. Checking \?\C:\Users\tommy\AppData\Local\MEGAsync
2021-02-23T13:28:38.332Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Local\MEGAsync is a git repository
2021-02-23T13:28:38.332Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Local\MEGAsync
2021-02-23T13:28:38.425Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-23T13:28:38.427Z DEBUG topgrade::steps::os::windows > Startup link: Lnk { path: Some("C:\Users\tommy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Telegram.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_NAME | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 132442405363616763, access_time: 132444027465982713, write_time: 132425724860000000, file_size: 68653160, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2020-09-10T19:42:16.361Z), modified_on: Some(2020-08-22T12:21:26Z), accessed_on: Some(2020-09-12T16:45:46.598Z) }, string_data: StringData { name_string: Some("Telegram autorun link.\nYou can disable autorun in Telegram settings."), relative_path: Some("..\..\..\..\..\Telegram Desktop\Telegram.exe"), working_dir: Some("C:\Users\tommy\AppData\Roaming\Telegram Desktop"), command_line_arguments: Some("-autostart"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 118, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 56, common_network_relative_link_offset: 0, common_path_suffix_offset: 117, local_base_path_offset_unicode: 28, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\Users\tommy\AppData\Roaming\Telegram Desktop\Telegram.exe"), common_network_relative_link: None, common_path_suffix: Some(""), local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: None, console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: None, property_store_props: Some(PropertyStoreDataBlock { block_size: 166, block_signature: 2684354569, property_store: [97, 0, 0, 0, 49, 83, 80, 83, 85, 40, 76, 159, 121, 159, 57, 75, 168, 208, 225, 212, 45, 225, 213, 243, 69, 0, 0, 0, 5, 0, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 84, 0, 101, 0, 108, 0, 101, 0, 103, 0, 114, 0, 97, 0, 109, 0, 46, 0, 84, 0, 101, 0, 108, 0, 101, 0, 103, 0, 114, 0, 97, 0, 109, 0, 68, 0, 101, 0, 115, 0, 107, 0, 116, 0, 111, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 85, 123, 245, 253, 103, 253, 47, 66, 166, 30, 54, 232, 156, 148, 195, 152, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 578701308695735778248432333313893232, droid: [235054023469330678890674588700100116664, 43674402351943992717721186139175504375], droid_birth: [235054023469330678890674588700100116664, 43674402351943992717721186139175504375] }), vista_and_above_idlist_props: None } }
2021-02-23T13:28:38.431Z DEBUG topgrade::steps::git > \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop\Telegram.exe is a file. Checking \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop
2021-02-23T13:28:38.432Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\AppData\Roaming\Telegram Desktop is a git repository
2021-02-23T13:28:38.432Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\AppData\Roaming\Telegram Desktop
2021-02-23T13:28:38.526Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }
2021-02-23T13:28:38.528Z DEBUG topgrade::steps::git > Checking if \?\C:\Users\tommy\Documents\PowerShell is a git repository
2021-02-23T13:28:38.529Z DEBUG topgrade::steps::git > Transformed path to C:\Users\tommy\Documents\PowerShell
2021-02-23T13:28:38.615Z TRACE topgrade::executor > Output of "C:\Program Files\Git\cmd\git.EXE" "rev-parse" "--show-toplevel": Output { status: ExitStatus(ExitStatus(128)), stdout: "", stderr: "fatal: not a git repository (or any of the parent directories): .git\n" }

―― 14:28:38 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Windows App Store: OK
2021-02-23T13:28:38.631Z DEBUG topgrade::terminal > Desktop notification: Topgrade finished sucessfully
PS C:\Users\tommy>

@MCOfficer
Copy link
Contributor

MCOfficer commented Feb 23, 2021

Apparently Get-WmiObject has been deprecated (and perhaps already removed?) in later versions of powershell: PowerShell/PowerShell#4766

Edit: Yup, it's missing in PS 7: https://powershell.org/forums/topic/powershell-7-is-missing-get-wmiobject/

@r-darwish
Copy link
Owner

@MCOfficer yes, it is. However, Topgrade explicitly runs this command in Windows Powershell. We can even see that in @blackcat-917 's output:

2021-02-22T19:08:29.127Z DEBUG topgrade::executor > Running "C:\ProgramData\chocolatey\lib\gsudo\bin\sudo.EXE" "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE" "-NoProfile" "-Command" "(Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() > $null"

I also run Topgrade from Powershell Core and I don't experience this issue. I'm not sure what am I missing here

@r-darwish
Copy link
Owner

image

@PolpOnline
Copy link
Author

PolpOnline commented Feb 24, 2021

I guess gsudo is the problem, that's the only difference I see between my system to the @r-darwish one.
I tried uninstalling gsudo but Topgrade tells me that "sudo is required" (ran from a non-administrator PSCore and from an administrator one, same output for both).
I can't tell if this is a Topgrade fault or a gsudo one, but the problem remains.

@MCOfficer
Copy link
Contributor

I'm fairly sure i have sudo from psutils instead of gsudo, but I'll check when I'm home.

@r-darwish
Copy link
Owner

I use gsudo as well

@MCOfficer
Copy link
Contributor

MCOfficer commented Feb 24, 2021

Mine is from psutils, but here's a new find: Scoop creates 2 shims for every application, one .cmd and one .ps1. topgrade calls the .cmd by default.

PS C:\Users\User> C:\Users\User\scoop\shims\sudo.cmd C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command "(Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod()"
(Get-WmiObject : The term '(Get-WmiObject' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ `(Get-WmiObject -Namespace  root\cimv2\mdm\dmmap -Class MDM_Enterpris ...
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: ((Get-WmiObject:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

But the .ps1 works!

PS C:\Users\User> C:\Users\User\scoop\shims\sudo.ps1 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command "(Get-WmiObject -Namespace 'root\cimv2\mdm\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod()"
__GENUS          : 1
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        : __PARAMETERS
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         : WINDEV2004EVAL
__NAMESPACE      : ROOT\cimv2\mdm\dmmap
__PATH           : \\WINDEV2004EVAL\ROOT\cimv2\mdm\dmmap:__PARAMETERS
ReturnValue      : 0
PSComputerName   : WINDEV2004EVAL

that cmd file seems to do a bit of magic with the arguments:

PS C:\Users\User> cat .\scoop\shims\sudo.cmd
@echo off
setlocal enabledelayedexpansion
set args=%*
:: replace problem characters in arguments
set args=%args:"='%
set args=%args:(=`(%
set args=%args:)=`)%
set invalid="='
if !args! == !invalid! ( set args= )
powershell -noprofile -ex unrestricted "& 'C:\Users\User\scoop\apps\sudo\current\sudo.ps1'  %args%;exit $lastexitcode"

@r-darwish
Copy link
Owner

Thanks @MCOfficer. With that insight I could finally figure out what's wrong.

@r-darwish
Copy link
Owner

See gerardog/gsudo#80

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants