Tutorials:Install Scripts: Difference between revisions

From LANCommander
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 2: Line 2:
== Overview ==
== Overview ==
LANCommander supports the use of install scripts for handling anything after the download and extraction of a game on a client machine. Common uses for install scripts include importing registry keys, updating configs, and templating file structures. Like all client-side scripts with LANCommander, these are essentially PowerShell scripts that are executed post-extraction.
LANCommander supports the use of install scripts for handling anything after the download and extraction of a game on a client machine. Common uses for install scripts include importing registry keys, updating configs, and templating file structures. Like all client-side scripts with LANCommander, these are essentially PowerShell scripts that are executed post-extraction.
There are a few guidelines that are recommended to follow when implementing a name change script for a game:
* The script should only replace the current name and should not touch anything outside of the player's profile
* Avoid leaving residual files on name changes. For instance, some games may have an entire file dedicated to a player's profile. This file should be renamed/altered to reflect the new name instead of a straight copy to a new profile.
* Review the [[Tutorials:PowerShell_Variables#Name_Change_Scripts|name change script variables]] for more information available during script execution
* Many games have a limit on the amount of characters a player name can have. Make sure to trim or pad your player names if required. This is especially crucial for games that store the player name in a binary file. Read [[Tutorials:PowerShell_Cmdlets]] for helper cmdlets that may help in these scenarios.
* Name change scripts will run after download of saves


Here are some examples of some post-install actions you may want to consider:
Here are some examples of some post-install actions you may want to consider:

Latest revision as of 23:05, 27 December 2023

Overview

LANCommander supports the use of install scripts for handling anything after the download and extraction of a game on a client machine. Common uses for install scripts include importing registry keys, updating configs, and templating file structures. Like all client-side scripts with LANCommander, these are essentially PowerShell scripts that are executed post-extraction.

Here are some examples of some post-install actions you may want to consider:

  • Import/create registry keys necessary for game execution
  • Automatic detection and config update to support the resolution of the primary display
  • Scaffolding save game file structures in the user's profile directory
  • Automatic installation of dependencies such as a redistributable

Note: After the extraction of the game is complete and the install script has been executed, the LANCommander Playnite extension will automatically execute any name change script

For a list of documented install scripts, see Category:Games With Install Scripts.