none
How to slove the problem for preventing Installation of a Device?

All replies

  • Hi,

    Thank you for posting here.

    Since your issue is related to VB forum, I will move the case to VB forum.

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 9, 2018 7:11 AM
  • Hi gaxjyxq,

    I don't find API to prevent installation of a device, do you consider whether or not to limit  its installation, you can  limit  whether it is enable or disable? If you are interested in this idea, you can take a look the following thread.

    https://stackoverflow.com/questions/1438371/win32-api-function-to-programmatically-enable-disable-device

    It is C#, but you can use any one converter tool to convert into vb.net.

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 12, 2018 9:55 AM
    Moderator
  • GAxmjyxq,

    The mission of all OS makers has always been to keep the end user away from the BIOS. Currently that is even more because of all kind of virus makers so doing that with a program is made almost impossible. 

    Many of your questions are around the hardware. Be aware, don't think you can do hardware wise with VB something which is not done yet in another program languages.

    https://en.wikipedia.org/wiki/BIOS

    If you want to prevent this as an administrator, you have to use the tools for the administrator. But those are not a subject of this forum.  


    Success Cor


    Monday, February 12, 2018 10:27 AM
  • Thank you, i think GPE can do it, why i cannot do it?
    Monday, February 12, 2018 11:48 AM
  • Thank you, i think GPE can do it, why i cannot do it?

    Download this guide, it shows what registry keys need to be created/modified/deleted for each GPE action. It is the Group Policy Settings Reference for Windows and Windows Server.

    Thursday, February 15, 2018 5:58 AM
  • Thank you, i think GPE can do it, why i cannot do it?
    You probably could if you knew how GPE does it. Everybody on this forum raise your hand if you know how GPE does it. Hmmmm, I don't see any hands raised.

    La vida loca

    Thursday, February 15, 2018 6:35 PM
  • I known the DeviceInstallation.admx file, it's the xml file, i have known the changed location in Registry, but i do not know which APIs GPE invoke to take effect at once.

    <policy name="DeviceInstall_IDs_Deny" class="Machine" displayName="$(string.DeviceInstall_IDs_Deny)" explainText="$(string.DeviceInstall_IDs_Deny_Help)" presentation="$(presentation.DeviceInstall_IDs_Deny)" key="Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions" valueName="DenyDeviceIDs">
          <parentCategory ref="DeviceInstall_Restrictions_Category" />
          <supportedOn ref="windows:SUPPORTED_WindowsVista" />
          <enabledValue>
            <decimal value="1" />
          </enabledValue>
          <disabledValue>
            <decimal value="0" />
          </disabledValue>
          <elements>
            <list id="DeviceInstall_IDs_Deny_List" key="Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyDeviceIDs" valuePrefix="" />
            <boolean id="DeviceInstall_IDs_Deny_Retroactive" valueName="DenyDeviceIDsRetroactive" >
              <trueValue>
                <decimal value="1" />
              </trueValue>
              <falseValue>
                <decimal value="0" />
              </falseValue>
            </boolean>
          </elements>
        </policy>

    Friday, February 16, 2018 8:39 AM
  • Gaxjyxq

    Why the Group Policy Object Editor can do it and you not I've already written in this thread. 


    https://msdn.microsoft.com/en-us/library/aa374163(v=vs.85).aspx



    Success
    Cor

    Friday, February 16, 2018 8:49 AM