Windows 10 上用于删除软件包的 DISM 替代方案

Windows 10 上用于删除软件包的 DISM 替代方案

除了 DISM 之外,还有什么方法(手动或自动)可以在离线模式下(已安装的 wim)从 Windows 中删除安装包吗?

任何自动化解决方案都应支持通过 WinApi 进行删除,并且需要支持 Windows 10。软件包删除需要像 DISM 一样准确,因此简单地确定要删除哪些文件是不够的。注册表和可能的其他文件需要进行相应的修改。

我所知道的唯一可以完成这个工作的工具是:

  • Imagex:MS-Tool。DISM 已弃用。不支持 Win 10。
  • PkgMgr:MS 工具。DISM 已弃用该工具,但可在 Windows 10 上使用。
  • DISM:微软当前的包管理工具。
  • PowerShell 的Remove-AppxPackagecmdlet:仅适用于实时系统。不支持已安装的 wim 文件。

有没有什么方法(由 MS 支持)可以像 DISM 那样以适当的方式手动删除软件包,或者通过其他方式(如 WinAPI 或其他工具)删除软件包?

答案1

启用-WindowsOptionalFeature禁用-WindowsOptionalFeature是 Powershell 中 DISM 的“对应版本”。Peter Hahndorf 在他的博客上讨论了这些工具,并列出了它们的名称。http://peter.hahndorf.eu/blog/WindowsFeatureViaCmd*-WindowsOptionalFeature 支持的列表如下:

ActiveDirectory-PowerShell 
ADCertificateServicesManagementTools 
ADCertificateServicesRole 
AdminUI 
Application-Server 
Application-Server-HTTP-Activation 
Application-Server-MSMQ-Activation 
Application-Server-Pipe-Activation 
Application-Server-TCP-Activation 
Application-Server-TCP-Port-Sharing 
Application-Server-WAS-Support 
Application-Server-WebServer-Support 
AppServer 
AS-Dist-Transaction 
AS-Ent-Services 
AS-Incoming-Trans 
AS-NET-Framework 
AS-Outgoing-Trans 
AS-WS-Atomic 
AuthManager 
BdeAducExtTool 
BiometricFramework 
BitLocker 
BitLocker-NetworkUnlock 
BitLocker-RemoteAdminTool 
Bitlocker-Utilities 
BITS 
BITSExtensions-AdminPack 
BITSExtensions-Upload 
BusScan-ScanServer 
CCFFilter 
CertificateEnrollmentPolicyServer 
CertificateEnrollmentServer 
CertificateServices 
CertificateServicesManagementTools 
ClientForNFS-Infrastructure 
CoreFileServer 
CoreFileServer-RSAT 
DamgmtTools 
DataCenterBridging 
Dedup-Core 
DesktopExperience 
DfsMgmt 
DFSN-Server 
DFSR-Infrastructure-ServerEdition 
DHCPServer 
DHCPServer-Tools 
DirectoryServices-ADAM 
DirectoryServices-ADAM-Tools 
DirectoryServices-AdministrativeCenter 
DirectoryServices-DomainController 
DirectoryServices-DomainController-Tools 
DirectoryServices-ISM-Smtp 
DirectPlay 
DNS-Server-Full-Role 
DNS-Server-Tools 
DSC-Service 
EnhancedStorage 
FailoverCluster-AdminPak 
FailoverCluster-AutomationServer 
FailoverCluster-CmdInterface 
FailoverCluster-FullServer 
FailoverCluster-Mgmt 
FailoverCluster-PowerShell 
FaxServiceConfigRole 
FaxServiceRole 
FileAndStorage-Services 
FileServerVSSAgent 
File-Services 
File-Services-Search-Service 
FRS-Infrastructure 
FSRM-Infrastructure 
FSRM-Infrastructure-Services 
FSRM-Management 
Gateway 
Gateway-UI 
HCAP-Server 
HCSRuntime 
HCSUI 
IAS NT Service 
IdentityServer-SecurityTokenService 
IIS-ApplicationDevelopment 
IIS-ApplicationInit 
IIS-ASP 
IIS-ASPNET 
IIS-ASPNET45 
IIS-BasicAuthentication 
IIS-CertProvider 
IIS-CGI 
IIS-ClientCertificateMappingAuthentication 
IIS-CommonHttpFeatures 
IIS-CustomLogging 
IIS-DefaultDocument 
IIS-DigestAuthentication 
IIS-DirectoryBrowsing 
IIS-FTPExtensibility 
IIS-FTPServer 
IIS-FTPSvc 
IIS-HealthAndDiagnostics 
IIS-HostableWebCore 
IIS-HttpCompressionDynamic 
IIS-HttpCompressionStatic 
IIS-HttpErrors 
IIS-HttpLogging 
IIS-HttpRedirect 
IIS-HttpTracing 
IIS-IIS6ManagementCompatibility 
IIS-IISCertificateMappingAuthentication 
IIS-IPSecurity 
IIS-ISAPIExtensions 
IIS-ISAPIFilter 
IIS-LegacyScripts 
IIS-LegacySnapIn 
IIS-LoggingLibraries 
IIS-ManagementConsole 
IIS-ManagementScriptingTools 
IIS-ManagementService 
IIS-Metabase 
IIS-NetFxExtensibility 
IIS-NetFxExtensibility45 
IIS-ODBCLogging 
IIS-Performance 
IIS-RequestFiltering 
IIS-RequestMonitor 
IIS-Security 
IIS-ServerSideIncludes 
IIS-StaticContent 
IIS-URLAuthorization 
IIS-WebDAV 
IIS-WebServer 
IIS-WebServerManagementTools 
IIS-WebServerRole 
IIS-WebSockets 
IIS-WindowsAuthentication 
IIS-WMICompatibility 
InkAndHandwritingServices 
Internet-Explorer-Optional-amd64 
IPAMClientFeature 
IPAMServerFeature 
iSCSITargetServer 
iSCSITargetServer-PowerShell 
iSCSITargetStorageProviders 
iSNS_Service 
KeyDistributionService-PSH-Cmdlets 
LegacyComponents 
Licensing 
Licensing-Diagnosis-UI 
Licensing-UI 
LightweightServer 
ManagementOdata 
MediaPlayback 
Microsoft-Hyper-V 
Microsoft-Hyper-V-Management-Clients 
Microsoft-Hyper-V-Management-PowerShell 
Microsoft-Hyper-V-Offline 
Microsoft-Hyper-V-Online 
Microsoft-Windows-Deployment-Services 
Microsoft-Windows-Deployment-Services-Admin-Pack 
Microsoft-Windows-Deployment-Services-Deployment-Server 
Microsoft-Windows-Deployment-Services-Legacy-SIS 
Microsoft-Windows-Deployment-Services-Transport-Server 
Microsoft-Windows-FCI-Client-Package 
Microsoft-Windows-GroupPolicy-ServerAdminTools-Update 
MicrosoftWindowsPowerShell 
MicrosoftWindowsPowerShellISE 
MicrosoftWindowsPowerShellRoot 
MicrosoftWindowsPowerShellV2 
Microsoft-Windows-ServerEssentials-ServerSetup 
Microsoft-Windows-Web-Services-for-Management-IIS-Extension 
MSMQ 
MSMQ-ADIntegration 
MSMQ-DCOMProxy 
MSMQ-HTTP 
MSMQ-Multicast 
MSMQ-RoutingServer 
MSMQ-Server 
MSMQ-Services 
MSMQ-Triggers 
MSRDC-Infrastructure 
MultipathIo 
NetFx3 
NetFx3ServerFeatures 
NetFx4 
NetFx4Extended-ASPNET45 
NetFx4ServerFeatures 
NetworkDeviceEnrollmentServices 
NetworkLoadBalancingFullServer 
NetworkLoadBalancingManagementClient 
NFS-Administration 
NIS 
NPAS-Role 
NPSManagementTools 
OEM-Appliance-OOBE 
OnlineRevocationServices 
OnlineRevocationServicesManagementTools 
P2P-PnrpOnly 
PeerDist 
PKIClient-PSH-Cmdlets 
Printing-AdminTools-Collection 
Printing-Client 
Printing-Client-Gui 
Printing-InternetPrinting-Client 
Printing-InternetPrinting-Server 
Printing-LPDPrintService 
Printing-LPRPortMonitor 
Printing-Server-Foundation-Features 
Printing-Server-Role 
Printing-XPSServices-Features 
PSync 
QWAVE 
RasCMAK 
RasRoutingProtocols 
RasServerAdminTools 
RemoteAccess 
RemoteAccessMgmtTools 
RemoteAccessPowerShell 
RemoteAccessServer 
RemoteAssistance 
Remote-Desktop-Services 
ResumeKeyFilter 
RightsManagementServices 
RightsManagementServices-AdminTools 
RightsManagementServicesManagementTools 
RightsManagementServices-Role 
RMS-Federation 
RPC-HTTP_Proxy 
RSAT 
RSAT-ADDS-Tools-Feature 
RSAT-AD-Tools-Feature 
RSAT-Hyper-V-Tools-Feature 
RSAT-NIS 
RSAT-RDS-Tools-Feature 
SBMgr-UI 
SearchEngine-Server-Package 
Security-SPP-Vmw 
ServerCore-Drivers-General 
ServerCore-EA-IME 
ServerCore-EA-IME-WOW64 
ServerCore-FullServer 
ServerCore-WOW64 
Server-Drivers-General 
Server-Drivers-Printers 
ServerForNFS-Infrastructure 
Server-Gui-Mgmt 
Server-Gui-Shell 
ServerManager-Core-RSAT 
ServerManager-Core-RSAT-Feature-Tools 
ServerManager-Core-RSAT-Role-Tools 
Server-Manager-RSAT-File-Services 
ServerMediaFoundation 
ServerMigration 
Server-Psh-Cmdlets 
Server-RSAT-SNMP 
ServicesForNFS-ServerAndClient 
SessionDirectory 
SimpleTCP 
SIS-Limited 
SMB1Protocol 
SMBBW 
SmbDirect 
SMBHashGeneration 
SmbWitness 
Smtpsvc-Admin-Update-Name 
Smtpsvc-Service-Update-Name 
SNMP 
Storage-Services 
TelnetClient 
TelnetServer 
TFTP 
TIFFIFilter 
TlsSessionTicketKey-PSH-Cmdlets 
UpdateServices 
UpdateServices-API 
UpdateServices-Database 
UpdateServices-RSAT 
UpdateServices-Services 
UpdateServices-UI 
UpdateServices-WidDatabase 
User-Interfaces-Infra 
VmHostAgent 
VolumeActivation-Full-Role 
WAS-ConfigurationAPI 
WAS-NetFxEnvironment 
WAS-ProcessModel 
WAS-WindowsActivationService 
WCF-HTTP-Activation 
WCF-HTTP-Activation45 
WCF-MSMQ-Activation45 
WCF-NonHTTP-Activation 
WCF-Pipe-Activation45 
WCF-Services45 
WCF-TCP-Activation45 
WCF-TCP-PortSharing45 
WebAccess 
Web-Application-Proxy 
WebEnrollmentServices 
WindowsFeedbackForwarder 
Windows-Identity-Foundation 
Windows-Internal-Database 
WindowsMediaPlayer 
WindowsPowerShellWebAccess 
WindowsServerBackup 
WindowsServerBackupSnapin 
WindowsStorageManagementService 
WINSRuntime 
WINS-Server-Tools 
WirelessNetworking 
WMISnmpProvider 
WorkFolders-Server 
WSS-Product-Package 
Xps-Foundation-Xps-Viewer

相关内容