Skip to content

Conversation

@FadeMind
Copy link
Contributor

@FadeMind FadeMind commented Jul 18, 2025

Changes in hw_report.ps1

  • Force Large ProcessStartInfo + StandardOutputEncoding = UTF8
  • Never mix Encoding Default with UTF8
  • Windows Forms TextBox accepts and displays Unicode correctly
  • Remove manual encoding conversions
  • be sure WinAPI.Window is loaded before Add-Type

  • add hw_report.cmd Run hw_report.cmd to properly invoke the PS script with admin rights.
  • add pl_PL.h - translate GUI to Polish language.

FadeMind added 3 commits July 18, 2025 17:51
- Force Large ProcessStartInfo + StandardOutputEncoding = UTF8
- Never mix Encoding Default with UTF8
- Windows Forms TextBox accepts and displays Unicode correctly
- Remove manual encoding conversions
- be sure WinAPI.Window is loaded before Add-Type
Run hw_report.cmd to properly invoke the PS script with admin rights.
init translation to Polish language
@FadeMind FadeMind changed the title fix hw_report.ps1 fix hw_report.ps1, add hw_report.cmd pl_PL.h lang. translate. Jul 18, 2025
Copy link
Owner

@a1ive a1ive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please preserve the original indentation format.

Copy link
Owner

@a1ive a1ive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PowerShell script already includes logic to automatically run with administrator privileges, so adding an extra batch file is unnecessary.

nwinfo/hw_report.ps1

Lines 8 to 11 in 2a3e5ad

if (!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList "-File `"$($MyInvocation.MyCommand.Path)`" `"$($MyInvocation.MyCommand.UnboundArguments)`""
Exit
}

a1ive added a commit that referenced this pull request Jul 20, 2025
@FadeMind
Copy link
Contributor Author

@a1ive done

@a1ive a1ive merged commit 434ddc7 into a1ive:master Jul 20, 2025
@a1ive
Copy link
Owner

a1ive commented Jul 20, 2025

Thanks!

@FadeMind
Copy link
Contributor Author

michael-scott-youre-welcome

@FadeMind FadeMind deleted the patch-1 branch July 20, 2025 14:50
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

Successfully merging this pull request may close these issues.

2 participants