Skip to content

Instantly share code, notes, and snippets.

@iGlitch
Created April 11, 2018 13:28
Show Gist options
  • Save iGlitch/aba76ce1e60da5d2a4e8a1bd41f0600a to your computer and use it in GitHub Desktop.
Save iGlitch/aba76ce1e60da5d2a4e8a1bd41f0600a to your computer and use it in GitHub Desktop.
Install APPX files on PC
import zipfile
import os
print("make sure this is running in the same directory as your appx file")
appxfile=raw_input("please enter the file name of the appx you want to unpack: ")
folder=appxfile.replace(".appx","")
folder=folder.replace("bundle", "")
if not os.path.exists(folder):
os.makedirs(folder)
zip_ref = zipfile.ZipFile(appxfile, 'r')
zip_ref.extractall(folder)
zip_ref.close()
os.chdir(folder)
os.system('powershell.exe Add-AppxPackage -Path AppxManifest.xml -Register')
print ("Your Appx file was installed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment