Skip to main content

Automation

How to Automate Application Package Installation
Before going to automate package installation in a system, we assume that the Windows OS (Minimum Windows 10, Version 1809 (build 17763) or A Later Version) has already been installed. So, when we install the apps one by one it consumes a lot of time and becomes a tedious task, to avoid that we can follow the below steps:
  • Open CMD and type this command: winget search <app name>
            if the app name is more than one word, "" is needed, ex., winget search "Google Chrome"
            Output:
Name                     Id                     Version        Match                      Source
------------------------------------------------------------------------------------------------
Google Chrome (EXE)      Google.Chrome.EXE      131.0.6778.205 ProductCode: google chrome winget
Google Chrome            Google.Chrome          131.0.6778.205                            winget
Google Chrome Beta       Google.Chrome.Beta     132.0.6834.46                             winget
Google Chrome Beta (EXE) Google.Chrome.Beta.EXE 132.0.6834.46                             winget
Google Chrome Canary     Google.Chrome.Canary   133.0.6904.0                              winget
Google Chrome Dev        Google.Chrome.Dev      133.0.6888.2                              winget
Google Chrome Dev (EXE)  Google.Chrome.Dev.EXE  133.0.6888.2                              winget
            
            but if it's a single word, can type directly as, for example: winget search python
            Output:
Name                                 Id                                 Version         Match           Source
---------------------------------------------------------------------------------------------------------------
Python Launcher                      Python.Launcher                    3.12.0          Command: python winget
Python 2                             Python.Python.2                    2.7.18150       Command: python winget
Python 3.0                           Python.Python.3.0                  3.0.1           Command: python winget
Python 3.1                           Python.Python.3.1                  3.1.4           Command: python winget
Python 3.10                          Python.Python.3.10                 3.10.11         Command: python winget
Python 3.11                          Python.Python.3.11                 3.11.9          Command: python winget
Python 3.12                          Python.Python.3.12                 3.12.8          Command: python winget
Python 3.13                          Python.Python.3.13                 3.13.1          Command: python winget

            The Source of ID you are choosing to install should be from winget or msstore as these two are trusted sources.
  • Paste the Application ID in a Notepad. Line by line go on pasting the IDs of different apps.
  • Save the Notepad in .bat once you listed the IDs in Notepad
            -    Now, in Notepad write the 

First Line of CMD: winget source update (to Install Updated Version, Can Skip this if Not Important)

Next Commands: 
            -    winget install -e -id Google.Chrome.EXE --silent
            -    winget install -e -id Python.Python.3.13 --silent

                -    -e    is for Execution
                -    --id is for Source ID we're choosing for installation
                -    --silent is for Silent Installation, without seeking our intervention (it may ask once for pressing "Y" for Admin rights if trying from user profile)
            -    Finally, Save the Notepad File in .bat format, can save it in a Pendrive to run the batch file in another system where the same set of applications need to be installed

Comments