> After searching the entire JDK source code, I found that WMIC is only used in 
> four files. These WMIC calls can be replaced with PowerShell for WMI.
> 
> The primary challenge in this replacement is to make it work the same as 
> before, even if the output format of the PowerShell command is different from 
> the original WMIC output. Where necessary, I've adjusted the output 
> formatting to maintain consistency.
> 
> Regarding the PowerShell options `-NoLogo`, `-NoProfile`, and 
> `-NonInteractive`, I've included them only when they are already used in the 
> surrounding code within the affected file.
> Note: In my environment, it worked correctly even without these options.
> 
> The `failure_handler` outputs powershell command execution results directly 
> into HTML. While the number and order of output items may differ slightly 
> after the modification, all previously output items are still included. 
> Therefore, I believe this is not a problem. Specific output changes are 
> located in:
> 
> - `environment.html`: `windows/system/os` section
> - `process.html`: `[Process ID]/windows/native/info` section
> 
> **Testing:**
> I have confirmed that all tests in `jdk/tools/jpackage` pass after these 
> changes.

Daishi Tabata has updated the pull request incrementally with one additional 
commit since the last revision:

  run jcheck

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/24791/files
  - new: https://git.openjdk.org/jdk/pull/24791/files/36e466d2..76a3a7ee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24791&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24791&range=00-01

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/24791.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24791/head:pull/24791

PR: https://git.openjdk.org/jdk/pull/24791

Reply via email to