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

Cannot "Save with MUI" on stock aero with zero modifications #118

Closed
3 tasks done
TiberiumFusion opened this issue Apr 27, 2023 · 5 comments
Closed
3 tasks done

Cannot "Save with MUI" on stock aero with zero modifications #118

TiberiumFusion opened this issue Apr 27, 2023 · 5 comments
Labels

Comments

@TiberiumFusion
Copy link

TiberiumFusion commented Apr 27, 2023

Windows Version: 6.1.7601.26465

Expected behavior
I should be able to open the RTM aero.msstyles file in msstylesEditor, make zero changes, and then successfully save it back to its msstyles+mui files.

Actual behavior
msstylesEditor displays an error message when attempting to save. No new files are written to disk. No changes are made to the opened file.

Additional context

  1. Use Windows 7
  2. Copy C:\Windows\Resources\Themes\Aero and C:\Windows\Resources\Themes\Aero\aero.theme somewhere
  3. Open aero.msstyles in msstylesEditor
  4. Don't make any changes
  5. Choose "Save with MUI". Enter a new name like aaa.msstyles since msstylesEditor refuses to update the opened file itself.
  6. Get error:
    error
  7. Observe that no new files have been written, and no opened files have been updated.

Checklist

  • My uxtheme.dll is patched
  • I am using the latest version of msstyleEditor (2.0.0.6)
  • None of the other issues cover this (yes/no, see below)
    Issue Error saving file: "Updating string resource with id '7' failed with error '50'!" #100 mentions this same error message, but 1) the OP from No.100 is using a different version of Windows than I am, 2) he did not specify/provide the theme he was trying to save, and 3) since he is using Windows "18363.1139", it is highly unlikely that the theme he used was 6.1.7600.16385's Aero which I am working with. Given that my environment is different from No.100 and I provided reproducible steps unlike No.100, it made the most sense to open a fresh ticket.

NB: Just to reiterate, this problem only occurs when using the "Save with MUI" command. Using the more simply named "Save" command does not produce this problem.

@nptr
Copy link
Owner

nptr commented Apr 27, 2023

Thanks for the extensive report! It likely has to do with the string table handling. MsstyleEditor seemingly tried to update a resource that is located in the .mui file - which the windows resource API doesn't support and subsequent complains about.

What languages does your .mui`s string table contain (what languages do you have installed on your Windows)?

I should be able to reproduce it on my system as well, otherwise I might get back to you and ask for the theme folder.

@TiberiumFusion
Copy link
Author

TiberiumFusion commented Apr 27, 2023

@nptr
I am using the most common Windows 7 installation type in the world: en-US with zero language packs installed.

So the only theme MUIs present on my system are all strictly en-US. The stock aero theme on my system has zero modifications, and all of its files are identical to the ones on the official 7 SP1 installation ISO. It should be easy to obtain these.

If the issue is indeed related to locales, I recommend that you ensure msstylesEditor defers to culture invariant handling of data as a default and also when no locale is specified/needed/inferrable.

@nptr
Copy link
Owner

nptr commented Apr 28, 2023

A fix is in progress. I'll keep you posted.

@nptr
Copy link
Owner

nptr commented Apr 28, 2023

Find the version 2.0.0.7 pre-release here: https://github.com/nptr/msstyleEditor/releases/tag/2.0.0.7

It contains the (hopefully final) fix to this issue. As mentioned before, because of a logic error msstyleEditor tried to update a resource that is located in the .msstyles.mui file - which the Windows resource API doesn't support.

I'll remove the "pre-release" mark and close the relevant issues once I am confident that the fix works as intended.

@TiberiumFusion
Copy link
Author

I repeated my attempt to re-save aero using the 2.0.0.7 release and it worked as intended.

Thanks for addressing the issue quickly.

@nptr nptr closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants