Simple js helper functions to get information about local steam installation from windows registry
npm i -S steam-winreg
import {getSettings} from 'steam-winreg'
async function main(){
console.log(await getSettings());
}
main().then();
Output:
{ Language: 'russian',
SteamExe: 'd:/steam/steam.exe',
SteamPath: 'd:/steam',
SuppressAutoRun: false,
Restart: false,
BigPictureInForeground: false,
RememberPassword: true,
SourceModInstallPath: 'D:\\steam\\steamapps\\sourcemods',
Rate: '30000',
AlreadyRetriedOfflineMode: false,
WebHelperFirewall: 2,
DWriteEnable: true,
StartupMode: false,
RunningAppID: 0 }
NOTE steam save some information about apps which currently not installed in registry. See Installed
property
import {getSettings} from 'steam-winreg'
async function main(){
console.log(await getApps());
}
main().then();
Output:
{ '2820':
{ Installed: false,
Updating: false,
Name: 'X3: Terran Conflict',
Running: false },
'8500':
{ Installed: true,
Updating: false,
Launching: false,
Running: false,
Name: 'EVE Online' },
'24980':
{ Installed: false,
Updating: false,
Running: false,
Name: 'Mass Effect 2' }
}
import {getSettings} from 'steam-winreg'
async function main(){
console.log(await getActiveProcess());
}
main().then();
Output:
{ pid: 7777777,
SteamClientDll: 'D:\\steam\\steamclient.dll',
SteamClientDll64: 'D:\\steam\\steamclient64.dll',
Universe: 'Public',
ActiveUser: 0 }
or if there is no active process
null
MIT