Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Not able to call DISM functions from WMI provider

$
0
0

I needed to enable disable(on/off) windows features from my C# WMI provider Dll.
I tried using the native functions from DismApi.dll. (I use DllImport ).The functions wanted to use are DismInitialize, DismOpenSession, DismEnableFeature, DismDisableFeature and DismCloseSession.

When I call DismInitialize from WMI provider Dll I am getting HR result as 0x800702e4 (The requested operation requires elevation).
I am calling the coupled WMI provider with the help of PowerShell scripts. The PowerShell ISE is running as Administrator.

Also just for tests I tried using Dism APIs from console application instead of WMI provider. If I call same DISM APIs from console application I am not getting 0x800702e4 error.

Any suggestions to get over this issue ?


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>