You were actually on the right track, but you did a bit too much work. The reason you are getting the
"parameter is incorrect" error is likely because the commands you used (specifically the active command) are meant for older "Legacy/MBR" systems. Modern computers use "UEFI/GPT", which requires a different partition structure and doesn't use the active
flag at all. You don't need to manually create or format these partitions.
The Windows installer prefers to do it automatically.
Open CMD again from the installer (Shift + F10). Type diskpart and press Enter. Type list disk and press Enter.
Type select disk 0 (assuming 0 is your target drive) and press Enter. Type clean and press Enter.
(This completely wipes the drive and removes any corrupted formatting).
Now, stop here, type exit to leave DiskPart, and type exit again to close the command prompt. Go back to
your Windows installer screen. If needed, click "Refresh". You should see your drive listed as
"Drive 0 Unallocated Space." Don't click "New" or "Format". Just click on that unallocated space to highlight it. And click Next. Windows will automatically create all the required partitions (EFI, System, Primary) in the
correct modern format and install the OS.