-
Notifications
You must be signed in to change notification settings - Fork 137
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
DISM does not work properly when run with sudo #82
Comments
Huh. I can't seem to repro this locally. That's weird. Were you using sudo to run the command as another user/? |
Nope just as normal. Disclaimer: I used a backported version from Canary on my beta branch OS before, then "updated" to 24H2 via downgrading my Insider membership to Release Preview. Here is the properties of my sudo.exe (no idea why the signature date is in German, just Windows things) |
Yeah it works from an elevated console window just fine and I did the same google search before filing the issue haha Here's what that sudo points to, is that the correct version? I'm pretty sure I just dropped it in there yeah. |
About the timestamp, in my case, it uses my local language. Which is English. Do you have other languages installed on your system? |
But yeah, I also have one user on my computer, I received the same error code (31). I tested all configuration sudo offers. |
Okay we may be onto a lead: on my dev box, |
as a workaround, running the command like this |
I'm not an expert at Windows programming, but from what I understand DISM calls I'm not sure why it would return error 31. I suspect that if the permissions of a directory are set to something like SYSTEM then sudo could be unable to perform actions inside of that directory, though I created a C file with |
I was looking around the Edit: I can finally share the logs from Although they don't provide enough details on why dism failed |
Okay this is MSFT:51791454 internally |
I've also encountered this on 24H2 (release channel). Workaround for me right now is |
Sudo for Windows version
1.0.0
Windows build number
10.0.26100.0
Other Software
Note that it does work if you don't use sudo and just run DISM in an elevated shell.
Steps to reproduce
sudo dism /Online /Cleanup-Image /RestoreHealth
sudo is set to inline mode
Expected Behavior
DISM works
Actual Behavior
❯ sudo dism /Online /Cleanup-Image /RestoreHealth
Deployment Image Servicing and Management tool
Version: 10.0.26100.1
Error: 31
An error occurred while creating the log file.
Ensure that the path to the log file exists and that you have Read/Write permissions on the folder where the log files will be created.
The text was updated successfully, but these errors were encountered: