Avast Free Antivirus won't install after completely uninstalling McAfee trial that came with new PC

When I try to install Avast Free Antivirus it tells me it has encountered problems and even when I restart the PC the app is not installed. That is what it says in the installation log:
[2024-12-17 18:11:37.599] [error ] [repository ] [13600:18972] [8F8DC2: 87] Unable to create a directory ‘C:\Recovery\AutoApply\CustomizationFiles’ with error 0x00000003!

[2024-12-17 18:11:37.599] [error ] [avast-av ] [13600:18972] [568E39:3035] Execution of ‘class asw::repository::ActionCreateDirectory’ failed with:‘3(3)’

[2024-12-17 18:16:24.051] [error ] [repository ] [17100:16912] [8F8DC2: 87] Unable to create a directory ‘C:\Recovery\AutoApply\CustomizationFiles’ with error 0x00000003!

[2024-12-17 18:16:24.051] [error ] [avast-av ] [17100:16912] [568E39:3035] Execution of ‘class asw::repository::ActionCreateDirectory’ failed with:‘3(3)’

[2024-12-17 18:16:44.048] [error ] [avast-av ] [17100:16912] [568E39:3035] Execution of ‘class asw::repository::ActionRunProgram’ failed with:‘4294967295(ffffffff)’

[2024-12-17 18:16:44.223] [error ] [master ] [15876:18772] [9C9DEE:1105] Product ‘avast-av’ executed with err_code:‘111111’.

[2024-12-18 09:29:39.272] [error ] [repository ] [18484: 5332] [8F8DC2: 87] Unable to create a directory ‘C:\Recovery\AutoApply\CustomizationFiles’ with error 0x00000003!

[2024-12-18 09:29:39.272] [error ] [avast-av ] [18484: 5332] [568E39:3035] Execution of ‘class asw::repository::ActionCreateDirectory’ failed with:‘3(3)’

[2024-12-18 09:29:55.218] [error ] [avast-av ] [18484: 5332] [568E39:3035] Execution of ‘class asw::repository::ActionRunProgram’ failed with:‘4294967295(ffffffff)’

[2024-12-18 09:29:55.468] [error ] [master ] [17752: 4172] [9C9DEE:1105] Product ‘avast-av’ executed with err_code:‘111111’.

Please can someone help

First of all, one reason may be (on Windows 11) that the protection of windows come in action.
To verify that you can start the installation with admin-rights (right-click on the file and choose “execute as admin”) to prevent.
Another reason can be, that the McAfee-Software isn´t uninstalled correctly for some reason.
If the first attempt doesn’t (with admin-rights) fails, than you can try to unistall the McAfee-Software by using the specialised Uninstall-Tool MCPR.exe from the official website under SupportTools/MCPR
and try again after restart.

I’ll hope, that it will help you.

Thank you. Yes, I’d already tried both workarounds. I was definitely in administrator mode and I had used the MCPR uninstall tool. But I still couldn’t install the free antivirus.