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

Disk activty / network monitoring is not really required. #37

Open
mmotti opened this issue Oct 8, 2024 · 1 comment
Open

Disk activty / network monitoring is not really required. #37

mmotti opened this issue Oct 8, 2024 · 1 comment

Comments

@mmotti
Copy link

mmotti commented Oct 8, 2024

I'm not sure whether you are aware but it's actually possible to monitor registry keys instead of relying on disk / network usage.

https://gist.github.com/mmotti/bfc697d03c5c5b03d09806abdc6c107f

This exert uses PowerShell but I imagine it's possible to adapt to fit:

$STEAM_APPS_REG_PATH = "HKCU:\Software\Valve\Steam\Apps\*"

function Get-ActiveDownload {
    return Get-ItemProperty -Path $STEAM_APPS_REG_PATH -Name "Updating" -ErrorAction SilentlyContinue | Where-Object {$_.Updating -eq 1}
}

If the above returns any value then Steam is still downloading.

Example reg entries:

image

image

When Steam is downloading, the value of the "Updating" key will be 1. The value in not affected by drops in internet connectivity and only seems to return to 0 when the user manually pauses / cancels the download or the download completes.

@diogomartino
Copy link
Owner

I had absolutely no idea that was possible. I'll probably implement something like that and keep the old system so it still works with other apps. Thanks 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants