Skip to content

Command paths not found on Windows 7 #32

@hmckee

Description

@hmckee

When running the script on Windows 7 with the following command:
Update-Link.cmd "c:\users\admin\alias\command.lnk" light

The following error results:
The term '\Get-Link.ps1' 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.

Adding a '.' to the path in Update-Link.ps1 fixes the issue temporarily:
$lnk = & ("$PSScriptRoot\Get-Link.ps1") $Path
$lnk = & ("$PSScriptRoot.\Get-Link.ps1") $Path

There is probably a better way of doing this or setting PSScriptRoot to '.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions