Tutorials:PowerShell Variables

From LANCommander
Revision as of 06:29, 2 December 2023 by DoctorDalek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When LANCommander executes PowerShell scripts through the client, some variables are defined at runtime. The variables that are accessible vary based on script type. This page should be used as the official documentation of the variables.

Install Scripts

Name Type Description
$InstallDirectory string The install directory the game archive has been extracted to
$GameManifest LANCommander.SDK.GameManifest
The game manifest containing metadata about the game
$DefaultInstallDirectory string The default install directory as specified in the client
$ServerAddress string The source LANCommander server address

Name Change Scripts

Name Type Description
$InstallDirectory string The install directory the game archive has been extracted to
$GameManifest LANCommander.SDK.GameManifest
The game manifest containing metadata about the game
$DefaultInstallDirectory string The default install directory as specified in the client
$ServerAddress string The source LANCommander server address
$OldPlayerAlias string The player's alias before the name change (if available)
$NewPlayerAlias string The player's alias after the name change

Key Change Scripts

Name Type Description
$InstallDirectory string The install directory the game archive has been extracted to
$GameManifest LANCommander.SDK.GameManifest
The game manifest containing metadata about the game
$DefaultInstallDirectory string The default install directory as specified in the client
$ServerAddress string The source LANCommander server address
$AllocatedKey string The key that has been allocated to the user/machine

Uninstall Scripts

Name Type Description
$InstallDirectory string The install directory the game archive has been extracted to
$GameManifest LANCommander.SDK.GameManifest
The game manifest containing metadata about the game