[Windows] VMP prerequisite check fails on non-English Windows
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- operating-systems
Research direction
Start in src/backend_win/prereq.c and inspect how the DISM command output is used to determine whether VirtualMachinePlatform is enabled. Reproduce the headless prerequisite check on a non-English Windows installation, then verify that an enabled feature is accepted without the false prerequisite error.
Written by the indexing model from the issue text.
Description
Your issue
Description
On Windows 11 with a non-English system language, App Sandbox v0.1.8 incorrectly reports that the VirtualMachinePlatform feature is not enabled, even when it is enabled.
Environment
App Sandbox: v0.1.8
Windows 11 Home 25H2
Windows build: 26200.9445
System language: French
VirtualMachinePlatform: Enabled
HCS: Available
HCN: Available
Problem
Running:
dism.exe /Online /Get-FeatureInfo /FeatureName:VirtualMachinePlatform
on my French Windows installation returns localized output:
État : Activé
However, src/backend_win/prereq.c checks the DISM output for the hard-coded English string:
State : Enabled
As a result, App Sandbox reports:
App Sandbox --headless requires the 'VirtualMachinePlatform' Windows feature, which is not enabled.
even though the feature is actually enabled.
Reproduction
Enable VirtualMachinePlatform on a non-English Windows installation.
Run App Sandbox v0.1.8 in headless mode.
App Sandbox incorrectly reports that VirtualMachinePlatform is not enabled.
Workaround / tested fix
I changed the DISM invocation in src/backend_win/prereq.c from:
L"C:\Windows\System32\dism.exe /online /Get-FeatureInfo /FeatureName:%ls"
to:
L"C:\Windows\System32\dism.exe /English /online /Get-FeatureInfo /FeatureName:%ls"
After rebuilding App Sandbox v0.1.8 with this one-line change, AppSandbox.exe --headless no longer reports the false prerequisite error on my French Windows installation.
The change also avoids depending on localized DISM output.
A more robust long-term solution may be possible by avoiding parsing localized DISM text entirely, but /English appears to be a minimal fix.
Thanks for the project!
- Dominant language
- C
- Stars
- 704
- Forks
- 75
- Avg merge
- 9m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jamesstringer90/appsandbox
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jamesstringer90/appsandbox#95 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
jamesstringer90/appsandbox#154 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
jamesstringer90/appsandbox#152 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
jamesstringer90/appsandbox#151 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
jamesstringer90/appsandbox#149 ·
All issues in jamesstringer90/appsandbox
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·