How to Add and Remove Apps
2012-06-19 13:07
483 查看
http://technet.microsoft.com/en-us/library/hh852635.aspx
Published: February 29, 2012
Updated: May 31, 2012
Applies To: Windows 8
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
You can add line-of-business (LOB) Windows® Runtime-based apps to a Windows® image by using Windows PowerShell® or the Deployment Image Servicing and Management (DISM) platform. LOB Windows Runtime-based apps do not have to be certified
or installed through the Windows® Store, but they must be signed with a certificate that is chained to a trusted root certificate. Adding Windows Runtime-based apps that do not come from the Windows Store is called sideloading.
To install Windows Runtime-based apps that are not part of your business line, you must use the Windows Store.
The Dism.exe and Windows PowerShell commands only add, list, and remove Windows Runtime-based apps, you cannot use them to install traditional applications that can only be run on the desktop.
App Signing Requirements
You can install LOB Windows Runtime-based apps that are not signed by the Windows Store. LOB Windows Runtime-based apps must be cryptographically signed and can only be installed on a computer that trusts the signing certificate.
For more information about how to sign an app and using certificates, see App Packaging Tools.
Before you can add sideloaded LOB Windows Runtime-based apps to a Windows image:
You must enable the Allow all trusted applications to install Group Policy setting.
Before you can run sideloaded LOB Windows Runtime-based apps:
You must activate a sideloading product key or join the PC to an Active Directory domain that has the Allow all trusted applications to install Group Policy setting enabled.
You can enable sideloading on Windows® 8 Enterprise or Windows Server® 2012 by joining the PC to a domain. To enable sideloading on any other edition of Windows, or on a Windows 8 Enterprise PC that is not domain-joined, you must use a sideloading product activation
key.
Until the PC meets all of the sideloading requirements, app tiles on the Start menu will show an "X" in the bottom-right corner to indicate that a problem is preventing the app from running.
Open the Group Policy editor (gpedit.msc). For example, on a computer that is running Windows 8, from the Start screen, type Edit Group Policy, click Settings, and then select the Edit Group Policy setting
from the search results.
Under Local Computer Policy in the left pane, click to expand Computer Configuration, Administrative Templates, Windows Components, and then App Package Deployment.
Double-click the Allow all trusted apps to install setting.
In the Allow all trusted apps to install window, click Enabled and then click OK.
Setting the Group Policy to allow trusted applications updates the following registry setting:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx\AllowAllTrustedApps = 1
You can install an app package (.appx) on a per-user basis by using the add-appxpackage PowerShell cmdlet. These apps must be added for each user, but can roam with the user on to multiple PCs. There is no limit to the number of LOB apps you can
add for each user.
At the Windows PowerShell prompt on a Windows 8 or Windows Server 2012 computer, add a .appx file package. Include any required dependency app packages when you add the app. For example, type:
For more information, see App Installation Cmdlets in Windows PowerShell.
Provisioning LOB apps
Windows Runtime-based apps that are installed in the Windows image are called provisioned apps. Provisioned apps are staged in the image and are scheduled to be installed for every user of the Windows image at first logon.
You can add these apps to a Windows image when you boot into audit mode before you deploy the image by using the DISM app provisioning commands. For more information about audit mode, see Audit
Mode Overview.
Provisioned apps are specific to the PC and will not roam with the user. You can only install 24 provisioned apps in an image.
On a Windows image that has already been deployed, you should instead use the Add-AppxPackage cmdlet in Windows PowerShell. If you do use the DISM app provisioning commands on a deployed Windows image with active users, you should
log all users off of the image before you run the command.
To update a provisioned app, you must remove the provisioned app and then deploy the new version of the app. The update will then be applied the next time each user logs in.
Use the Deployment Image Servicing and Management (DISM) command-line tool or PowerShell cmdlets to add the LOB app without a Windows store license. For example, at an elevated command prompt, type:
Or, at a Windows PowerShell prompt, type:
For more information, see App Package (.appx) Servicing Command-Line Options or DISM
Cmdlets. For information about DISM supported platforms, see DISM Supported Platforms.
You can list the LOB Windows Runtime-based apps installed in on offline or online Windows image and get additional information about the packages.
You can get a list of the modern LOB Windows Runtime-based apps installed for a specific user account on the computer. You must open Windows PowerShell with administrator privileges to list the packages for a user other than the current user. For example,
at the Windows PowerShell prompt, type:
You can get a list of packages installed for a specific user. You must open Windows PowerShell with administrator privileges to list the packages for a user other than the current user. For example, at the Windows PowerShell prompt, type:
You can also get the manifest of an AppX package which includes information such as the package ID. For example, at the Windows PowerShell prompt, type:
You can use piping to get the manifest for an AppX package if you don’t know the full name of the package. For example, at the Windows PowerShell prompt, type:
You can get a list of the packages that are provisioned in a Windows image that will be installed for each new user by using Dism.exe or Windows PowerShell. For example, at a Windows PowerShell prompt, type:
Or, at a command prompt, type:
For more information, see How to Take Inventory of an Image or Component.
You can remove individual instances of an app, or remove the provisioning setting of an app.
You can remove a single app for the current user only. For example, at a command prompt, type:
When you remove a provisioned app, the app is removed for the current user, and will not be installed for new user accounts. If there are other user accounts that are active on the computer, the application will not be removed from those accounts.
For example, at an elevated Windows PowerShell prompt, type:
Or, at a command prompt, type:
Published: February 29, 2012
Updated: May 31, 2012
Applies To: Windows 8
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
You can add line-of-business (LOB) Windows® Runtime-based apps to a Windows® image by using Windows PowerShell® or the Deployment Image Servicing and Management (DISM) platform. LOB Windows Runtime-based apps do not have to be certified
or installed through the Windows® Store, but they must be signed with a certificate that is chained to a trusted root certificate. Adding Windows Runtime-based apps that do not come from the Windows Store is called sideloading.
To install Windows Runtime-based apps that are not part of your business line, you must use the Windows Store.
The Dism.exe and Windows PowerShell commands only add, list, and remove Windows Runtime-based apps, you cannot use them to install traditional applications that can only be run on the desktop.
App Signing Requirements
You can install LOB Windows Runtime-based apps that are not signed by the Windows Store. LOB Windows Runtime-based apps must be cryptographically signed and can only be installed on a computer that trusts the signing certificate.
For more information about how to sign an app and using certificates, see App Packaging Tools.
Windows 8 Sideloading Requirements
Before you can add sideloaded LOB Windows Runtime-based apps to a Windows image:You must enable the Allow all trusted applications to install Group Policy setting.
Before you can run sideloaded LOB Windows Runtime-based apps:
You must activate a sideloading product key or join the PC to an Active Directory domain that has the Allow all trusted applications to install Group Policy setting enabled.
You can enable sideloading on Windows® 8 Enterprise or Windows Server® 2012 by joining the PC to a domain. To enable sideloading on any other edition of Windows, or on a Windows 8 Enterprise PC that is not domain-joined, you must use a sideloading product activation
key.
Until the PC meets all of the sideloading requirements, app tiles on the Start menu will show an "X" in the bottom-right corner to indicate that a problem is preventing the app from running.
To set Group Policy for sideloading
Open the Group Policy editor (gpedit.msc). For example, on a computer that is running Windows 8, from the Start screen, type Edit Group Policy, click Settings, and then select the Edit Group Policy settingfrom the search results.
Under Local Computer Policy in the left pane, click to expand Computer Configuration, Administrative Templates, Windows Components, and then App Package Deployment.
Double-click the Allow all trusted apps to install setting.
In the Allow all trusted apps to install window, click Enabled and then click OK.
Setting the Group Policy to allow trusted applications updates the following registry setting:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx\AllowAllTrustedApps = 1
Add Apps
You can install an app package (.appx) on a per-user basis by using the add-appxpackage PowerShell cmdlet. These apps must be added for each user, but can roam with the user on to multiple PCs. There is no limit to the number of LOB apps you canadd for each user.
Add a LOB app to a user account
At the Windows PowerShell prompt on a Windows 8 or Windows Server 2012 computer, add a .appx file package. Include any required dependency app packages when you add the app. For example, type:add-appxpackage C:\app1.appx –DependencyPath C:\winjs.appx
For more information, see App Installation Cmdlets in Windows PowerShell.
Provisioning LOB apps
Windows Runtime-based apps that are installed in the Windows image are called provisioned apps. Provisioned apps are staged in the image and are scheduled to be installed for every user of the Windows image at first logon.
You can add these apps to a Windows image when you boot into audit mode before you deploy the image by using the DISM app provisioning commands. For more information about audit mode, see Audit
Mode Overview.
Provisioned apps are specific to the PC and will not roam with the user. You can only install 24 provisioned apps in an image.
On a Windows image that has already been deployed, you should instead use the Add-AppxPackage cmdlet in Windows PowerShell. If you do use the DISM app provisioning commands on a deployed Windows image with active users, you should
log all users off of the image before you run the command.
To update a provisioned app, you must remove the provisioned app and then deploy the new version of the app. The update will then be applied the next time each user logs in.
Add a provisioned LOB app to a Windows image
Use the Deployment Image Servicing and Management (DISM) command-line tool or PowerShell cmdlets to add the LOB app without a Windows store license. For example, at an elevated command prompt, type:DISM /Online /Add-ProvisionedAppxPackage /PackagePath:C:\App1.appx /SkipLicense
Or, at a Windows PowerShell prompt, type:
Add-AppxProvisionedPackage -Online -FolderPath C:\Appx
For more information, see App Package (.appx) Servicing Command-Line Options or DISM
Cmdlets. For information about DISM supported platforms, see DISM Supported Platforms.
Note |
---|
The computer does not have to be joined to a domain or have an activated sideloading product key before you install provisioned LOB apps. However, the apps will not run until the computer meets this sideloading requirement. For more information, see How to Customize the Start Screen. |
Inventory Apps
You can list the LOB Windows Runtime-based apps installed in on offline or online Windows image and get additional information about the packages.
List LOB Apps per user account
You can get a list of the modern LOB Windows Runtime-based apps installed for a specific user account on the computer. You must open Windows PowerShell with administrator privileges to list the packages for a user other than the current user. For example,at the Windows PowerShell prompt, type:
Get-AppxPackage -AllUsers
You can get a list of packages installed for a specific user. You must open Windows PowerShell with administrator privileges to list the packages for a user other than the current user. For example, at the Windows PowerShell prompt, type:
Get-AppxPackage -Name Package1 -User domain\username
You can also get the manifest of an AppX package which includes information such as the package ID. For example, at the Windows PowerShell prompt, type:
Get-AppxPackageManifest -Package Package1
You can use piping to get the manifest for an AppX package if you don’t know the full name of the package. For example, at the Windows PowerShell prompt, type:
(Get-AppxPackage -Name "*WinJS*" | Get-AppxPackageManifest).package.applications.application.id
List LOB apps that are provisioned in a Windows image
You can get a list of the packages that are provisioned in a Windows image that will be installed for each new user by using Dism.exe or Windows PowerShell. For example, at a Windows PowerShell prompt, type:Get-AppxProvisionedPackage -Path c:\offline
Or, at a command prompt, type:
DISM.exe /Image:C:\test\offline /Get-ProvisionedAppxPackages
For more information, see How to Take Inventory of an Image or Component.
Remove Apps
You can remove individual instances of an app, or remove the provisioning setting of an app.
Remove LOB apps per user account
You can remove a single app for the current user only. For example, at a command prompt, type:Remove-AppxPackage Package1
Remove provisioned LOB apps in a Windows image
When you remove a provisioned app, the app is removed for the current user, and will not be installed for new user accounts. If there are other user accounts that are active on the computer, the application will not be removed from those accounts.For example, at an elevated Windows PowerShell prompt, type:
Remove-AppxProvisionedPackage -Online -PackageName MyAppxPkg
Or, at a command prompt, type:
DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:microsoft.app1_1.0.0.0_neutral_en-us_ac4zc6fex2zjp
相关文章推荐
- Gluster FS - How to add and remove a node
- How To Add Google Apps and ARM Support to Genymotion v2.0+
- How to add app link into home screen/apps pages
- How to Add Columns to a DataGrid through Binding and Map Its Cell Values
- How To Quickly Add/Remove Column Statistics (Histograms) For A Column (文档 ID 390249.1
- How to add or remove a static ARP entry on Linux
- EPLAN API 入门系列- 提高篇(How to Add/Remove GraphicalLayer?)
- dynamically add and remove view to viewpager
- How to add a new user in linux and add it to a new group
- Android Build System ---- how to add your product and board config *.mk
- How to remove group and project in Gerrit
- How To create Netbeans Platform and add to netbeans IDE by netbean platform manager
- hdu 1082, stack emulation, and how to remove redundancy
- How to remove object key and develper key
- How do I add classes to main menu ul and li in Drupal 8
- How to create Navigation Collection ,publish it as a pagelet and add to homepage ?
- How to solve “add/remove operation is impossible, because the code element 'Cxxx' is read only” With
- how to use Dom to create and remove element
- How to Add a Icon to your Oracle Apps Toolbar item
- How to add remove user (standard user/non-root) in Kali Linux?