Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repairing python installation via command line

I have a package that contains the CPython installer and attempts to install it for the client.

In the event that there is a corrupt install, the %ERRORLEVEL% variable gets set to 1603. From the docs I can issue a command to uninstall, but it will fail in the installed instance requires a repair (such as the user deleted the directory before trying to uninstall). To resolve I'd like to attempt a repair using the installer in this case, but the docs do not list a way to do this via the command line.

I believe the installer is an MSI labeled as an EXE as the source uses WiX. I'm not intimately familiar with MSI or WiX, but I'd think there is some way to access the "Repair" feature available from double clicking the installer via the command line.

Is there a way to accomplish this?


1 Answers

Using Powershell, do this: Invoke-Expression "& 'D:\python-3.9.5-amd64.exe' /repair /passive"

like image 97
acrwevewrvr Avatar answered Mar 14 '26 10:03

acrwevewrvr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!