Pergunta

I just want to be able to programmatically do what gpedit.msc does. I'm trying to set the value of these keys to 1 and Update the Local Group Registry.

In gpedit.msc:

Local Computer Policy/Computer Configuration/Administrative Templates/System/Removable Storage Access

ValueName: All Removable Storage classes: Deny all access

Value: 1 (set this to 1)

Local Computer Policy/Computer Configuration/Administrative Templates/Windows Components/AutoPlay Policies

ValueName: Turn off Autoplay

Value: 1 ( set this to 1)

I think the key is to use IGroupPolicyObject in C++. However, I can't find any documentation that I can wrap my head around.

My application needs to disable/enable all USB Access without having to reboot Windows 7.

Foi útil?

Solução

I think that these links will help you:

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top