How to enable / disable Windows features programmatically

I want to enable / disable windows functions programmatically. This can usually be done using Control Panel -> Programs and Features -> Turn Windows feature on or off.

Are there any windows api for this? or any COM interface for this?

+3


source to share


2 answers


You can use DismEnableFeature

that is part of the Deployment Servicing and Management (DISM) API .



+2


source


you can use powershell script cmdlet and intall-windowsfeature:

Install-WindowsFeature -Name Web-Server



technology reference

0


source







All Articles