pseymour / MakeMeAdmin

Make Me Admin is a simple, open-source application for Windows that allows standard user accounts to be elevated to administrator-level, on a temporary basis.
https://makemeadmin.com/
GNU General Public License v3.0
391 stars 85 forks source link

Error while adding a user to the Administrators group #28

Closed pramodag closed 3 years ago

pramodag commented 3 years ago

I am getting an error when I try to add myself to the group Administrators. The program is installed with a local admin and this was working fine until the last 3 days. I had some issues with the com port and had to forcefully restart my PC a couple of times while the "MakeMeAdmin" has granted the temporary admin access. This is the only change I remember and I didn't install or uninstall any other programs recently. I have also tried disabling and enabling .net framework 3.5 and 4.8 from windows features but no luck. Also tried uninstalling and reinstalling the program still the same issue. I have also checked for port 808, it's free and no other application is using it.

Screenshot of the issue when I click on "Grant Me Administrator Rights" Enabled options in .net framework

Would be happy to get any additional debug log if required.

pseymour commented 3 years ago

I would bet, since you had to forcibly restart, that your users.xml file is corrupt. Depending on which version of MMA you're on, it will be somewhere under \Windows\System32\config\systemprofile or \ProgramData\Make Me Admin. I'm on mobile so I can't get exact paths easily. Just search those two places for a users.xml belonging to MMA, and delete it.

pramodag commented 3 years ago

Thank you @pseymour. Deleting the users.xml at "C:\Windows\System32\config\systemprofile\AppData\Roaming\Make Me Admin" fixed the issue

pseymour commented 3 years ago

Excellent. This is a known issue that happens occasionally. I've already started working on ways to mitigate it.

rmoreas commented 1 year ago

Hi @pseymour, do you know the root-cause of this issue? Ways to mitigate?

rmoreas commented 1 year ago

Could it be because the resources used by the streams are not correctly disposed? Maybe it helps to use the using statement to make sure that everything is properly freed up?

rmoreas commented 1 year ago

Sorry, now I see that you already started some work in #16. I'll continue there...