Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command paths not found on Windows 7 #32

Open
hmckee opened this issue Sep 27, 2017 · 1 comment
Open

Command paths not found on Windows 7 #32

hmckee opened this issue Sep 27, 2017 · 1 comment

Comments

@hmckee
Copy link

hmckee commented Sep 27, 2017

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 '.'

@frke242
Copy link

frke242 commented Jun 19, 2018

I had the same issue and this solved it for me. Thanks.

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

No branches or pull requests

2 participants