Hi Nuno,
Though the unattended uninstallation is supported by using the /S parameter (uninst.exe /S), it shouldn't be needed to perform it when upgrading the version - the installer of the new version will proceed with all necessary steps even if running in the "silent" mode.
Let me mention, that in recent versions, for the 3ds Max 2022 and above, our plug-ins are now installed at C:\ProgramData\Autodesk\ApplicationPlugins, using the latest package format for plugins and there's no need to specify /MAXVER & /MAXDIR parameters - these parameters have been "replaced" by the /APPPLUGINSDIR parameter (if you use the default location, there's no need to define it).
Best regards,