This simple Python script retrieves a list of installed programs from one or more Windows computers on your local network and writes those lists to text files.
I created this program to have a convenient backup of every installed program on all of my Windows PCs for when I need to perform factory resets
- Install Python
- Open
get-programs.py
in a text editor & set the name of the PCs:
... existing code ...
computers = ["DESKTOP-1, DESKTOP-2"] # Replace with the name(s) of your target Windows PCs
... existing code ...
- Each target computer must have the Remote Registry service running
- Open Windows Services and start the RemoteRegistry service
(optional: set the service to start automatically at startup if you're going to be running this program frequently)
IMPORTANT: Configure your Windows Firewall inbound rules to only accept Remote Service Management from the local IP address of the computer that will be running this code
- Open
run.bat
and enjoy!
- Install pyinstaller:
pip install pyinstaller
- Open a terminal window in the same folder as
get-programs.py
and run this command:
pyinstaller --onefile --noconsole get-programs.py
- That's it! You'll find the executable
get-programs.exe
in the 'dist' directory.
You can automatically run this program at a specific time or interval of your choice.
- Open Windows Task Scheduler.
- In the Actions pane on the right, click on "Create Basic Task...".
- Name the task (e.g., "Get-Installed-Programs").
- Choose a trigger interval (e.g., Daily, Weekly, Monthly, etc.)
- Choose a specific interval (e.g., time of day, day of the week, etc.) (I run mine once a day at midnight)
- Select "Start a program" as the Action
- Browse to the location of the
run.bat
(or the compiled .exe) that's located in the same folder asget-programs.py
- Set the
Start in (optional):
location to the folder that containsrun.bat
&get-programs.py
(e.g., "C:\Users\Henry\Documents\List-Of-Installed-Programs"). - In the Settings tab, uncheck the
Stop the task if it runs longer than:
checkbox. - You're all set! Click Finish.