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

Install-SteamCMD fails, Test-Path: Cannot bind argument #103

Open
suckmyhardware opened this issue Jul 14, 2024 · 2 comments
Open

Install-SteamCMD fails, Test-Path: Cannot bind argument #103

suckmyhardware opened this issue Jul 14, 2024 · 2 comments
Assignees
Labels
Category-Module Pertaining to the module's functionality itself. Issue-Discussion Let's talk about it!

Comments

@suckmyhardware
Copy link

suckmyhardware commented Jul 14, 2024

Describe "Module Bug or Issue"

Installing SteamCMD via Powershell. First installing the SteamPS, which is fine. As soon as I start installing SteamCMD through Powershell it fails.

Context "The Problem"

  • Installing SteamPS
  • Installing SteamPS
  • Installing fails with

Test-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\SteamPS\4.1.0\SteamPS.psm1:1275 char:29
if (Test-Path -Path (Get-SteamPath).Executable) {
CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand

Corresponding line in the SteamPS.psm1:

if (Test-Path -Path (Get-SteamPath).Executable) {

Output of Get-Module:

Get-Module -Name SteamPS -ListAvailable | Select-Object -Property Name, Version

Name Version
SteamPS 4.1.0

@suckmyhardware suckmyhardware added Category-Module Pertaining to the module's functionality itself. Issue-Discussion Let's talk about it! labels Jul 14, 2024
@hjorslev
Copy link
Owner

  1. What OS are you running?
  2. Could you lookup your Environment Variables in Windows Settings and see if SteamCMD is added to the path there?
    image

@hjorslev hjorslev self-assigned this Jul 18, 2024
@szalkerous
Copy link

szalkerous commented Dec 1, 2024

Same issue on Windows Server 2025 Standard.

By default, this is the $PSVersionTable.PSVersion:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      26100  2161

Within an administrator PS, run the following to install the newest version:

winget install --id Microsoft.PowerShell --source winget

Restarting as Powershell 7, $PSVersionTable.PSVersion now returns...

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      4      6

and running the Install-SteamCMD now works fine. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Module Pertaining to the module's functionality itself. Issue-Discussion Let's talk about it!
Projects
None yet
Development

No branches or pull requests

3 participants