neilpa / cmd-colors-solarized

Solarized color settings for Windows command prompt
1.11k stars 177 forks source link

Command paths not found on Windows 7 #32

Open hmckee opened 6 years ago

hmckee commented 6 years ago

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 commented 6 years ago

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