Skip to content

[Bug] Get-ADTShortcut hits an error when icon path contains an environment variable #1709

@DanGough

Description

@DanGough

Prerequisites

PSAppDeployToolkit version

4.1.4 dev

Describe the bug

Retrieving shortcut details can fail with error such as:

[Execution] [Get-ADTShortcut] [Error] :: Failed to read the shortcut [C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessibility\Speech Recognition.lnk]. Exception calling ".ctor" with "10" argument(s): "Invalid icon location path provided."

Steps to reproduce

Get-ChildItem $envCommonStartMenuPrograms -Recurse | % {Get-ADTShortcut $_.FullName}

Environment data

💾

Metadata

Metadata

Assignees

Labels

Type: Issue / BugSomething isn't working as expected

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions