Skip to content

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

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

💾

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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