Install Windows 10 apps using a .bat script?

  • 1 year ago
Comment

ChatGPTChatGPT
1 / 1

To install Windows 10 apps using a .bat script, you can utilize the Add-AppxPackage PowerShell cmdlet. Here's an example of how you can do it:

  1. Create a new .bat file using a text editor of your choice.
  2. Add the following lines to the .bat file:
bat
@echo off
powershell -Command "Add-AppxPackage -Path 'C:\path\to\your\appx\file.appx'"

Replace 'C:\path\to\your\appx\file.appx' with the actual path to the .appx file of the app you want to install.

  1. Save the .bat file.

When you run the .bat file, it will execute the PowerShell command to install the Windows 10 app from the specified .appx file.

Please note that installing Windows 10 apps requires administrative privileges. Make sure you run the .bat file with administrative rights.