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

Generate battery report when clicking on battery health #2311

Closed
2 tasks done
marcelomijas opened this issue Mar 27, 2024 · 12 comments
Closed
2 tasks done

Generate battery report when clicking on battery health #2311

marcelomijas opened this issue Mar 27, 2024 · 12 comments

Comments

@marcelomijas
Copy link
Contributor

marcelomijas commented Mar 27, 2024

Rules

  • I made myself familiar with the Readme, FAQ and Troubleshooting.
  • I understand that, if insufficient information will be provided, my issue will be closed without an answer.

Is your feature request related to a problem? Please describe

I think it would be useful to click on "battery heath" that is, below the "100%" button on the main window and open a generated windows battery report usnig the powercfg /batteryreport (cmd) command, the output could be saved on the GHelper folder using /output and then opened using the default html viewer.

I'd like to do it myself, but I still lack C# knowledge, so I'll stick to translations. I've watched this project grow almost from the beginning, I'm amazed at how far it's come. Thanks developers!

Describe the solution you'd like

Clicking on "battery status", i.e. below the "100%" button in the main window, should open a generated Windows battery report saved in the GHelper folder within AppData.

Newly generated battery reports should replace previous ones or include the date and time in the name.

Describe alternatives you've considered

No response

Device and Model

Asus Zephyrus G14 G401IV

Additional information.

No response

@seerge
Copy link
Owner

seerge commented Mar 27, 2024

@marcelomijas hello, that's a good idea. I was thinking about something like that as well.

This build should do the thing (and also open report in browser)

GHelper.zip

@marcelomijas
Copy link
Contributor Author

@seerge hi. I just tested it. It works like a charm! Thanks!

@seerge seerge closed this as completed Mar 27, 2024
@seerge
Copy link
Owner

seerge commented Mar 27, 2024

Great

@Sontarr
Copy link

Sontarr commented Mar 28, 2024

@seerge Should that already work in the latest build I got for the HDR testing?

powercfg /batteryreport normally saves in C:\Users\myusername\battery-report.html

When I click on battery health, G-Helper opens the Windows Explorer with C:\Users\myusername\Documents, but there is no battery-report.html. It isnt in %Appdata%\GHelper nor the installation directory of GHelper either. Where does it save that thing?

@seerge
Copy link
Owner

seerge commented Mar 28, 2024

@Sontarr can you check in a log where powercfg saved report ?

@Sontarr
Copy link

Sontarr commented Mar 28, 2024

🤦‍♂️ Of course....

Okaaay... thats the very full log where it failed:
log.txt

I then closed GHelper, deleted the logfile, opened GHelper again - and now it works:
log1.txt

@seerge
Copy link
Owner

seerge commented Mar 28, 2024

@Sontarr oke, by some reason it was trying to open "C:\Windows\system32\battery-report.html" gespeichert.", even tho it's not set anywhere . It generally supposed to create report from same directory where you run app.

@seerge
Copy link
Owner

seerge commented Mar 28, 2024

@Sontarr @marcelomijas

This build should explicitly generate report in user home directory (no matter from where you run app itself)

GHelper.zip

@mjishnu
Copy link

mjishnu commented Mar 31, 2024

image

log.txt

battery health report not saving, also its opening the document folder rather than the home (also not found in document folder).

@seerge
Copy link
Owner

seerge commented Mar 31, 2024

@mjishnu try this build

GHelper.zip

seerge added a commit that referenced this issue Mar 31, 2024
@mjishnu
Copy link

mjishnu commented Mar 31, 2024

@mjishnu try this build

GHelper.zip

works correctly now. btw in my opinion rather than storing in home it would be better to store in document folder as its far more easy to access

@seerge
Copy link
Owner

seerge commented Mar 31, 2024

@mjishnu i guess it's fine as is :) as home is always writeable at least

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

4 participants