How to automate minor version upgrades in Windows?

I maintain a bundled python + internal package installer as part of my job. It uses the /quiet switch to run inside an NSIS installer, but I’ve only been able to make this work for a fresh installation.

Is there a way to upgrade the installed python version (X.Y.A -> X.Y.B) without user interaction?

Would you mind sharing the exact problems you are facing? I’ve been developing and using a tool that sounds quite similar to yours (runs the installer in the bavkground, upgrades patch versions in-place), but haven’t noticed much problems. Maybe we can exchange some notes.

Here’s how I invoke the installer: https://github.com/uranusjr/pythonup-windows/blob/8dc6d31a741fef8c41b1a84f0162fb1dcf03fe73/pythonup/versions.py#L172-L208

Thanks for sharing that!
I now realize that my problem was that I didn’t know that the installer was capable of applying updates using the /passive or /quiet flags, and I never tried it myself.

After seeing how you do it, I tried it myself, and it works!

1 Like