views:

71

answers:

3

What would be the easiest way to programmatically check that Internet Explorer is switched off from Windows Features? Some registry key?

I'm trying to customize a dialogue shown to user based on whether IE is installed or not and whether IE is enabled or not.

+1  A: 

Get a list of processes running, and check for iexplore.exe . If it is present in the list, then IE is running. If not, not.

how you get the list of processes depends on your programming environment.

This approach doesn't detect apps that host the IE browser control.

Cheeso
No, I do not mean running, but switched off from Windows Features.(I edited the question also)
Meelik
A: 

On older versions of windows you could use sysocmgr.exe to install/remove optional components, it was replaced by pkgmgr.exe on Vista+ IIRC. You could open them in Dependency Walker and look at their list of imported API's, but I'm guessing it would just lead you to parts of the Setup API and lots of undocumented stuff.

On my XP machine, sysocmgr seems to use OCMANAGE.DLL ("Optional Component Manager Library") and none of its exported functions are documented AFAIK (The export named OcComponentState really jumps out at me)

Anders
A: 

If you're asking about whether IE is switched off on your own company's computers, then the best way would be not to ask, but rather to require that it not be turned off. Group Policy can be used for this purpose.

If you're asking about whether IE is switched off on your customer's computers that you might be installing some software on, then the best way to do it would be to document that IE must not be switched off, then to let the customer use Group Policy to make sure that IE is not switched off.

If neither of these scenarios are what you're looking for, then please update your question with more information, including why you're trying to accomplish this.

John Saunders