Hide disconnected devices in Device Manager

Page 1 of 2 12 LastLast

  1. Posts : 548
    Windows 10 Pro 64 bit 19042.1415
       #1

    Hide disconnected devices in Device Manager


    I used this command to show disconnected devices: SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
    But then I wanted to hide them, so I entered: SET DEVMGR_SHOW_NONPRESENT_DEVICES=0
    But it still shows disconnected devices! (When I click view/show hidden devices). Problem is even normally this doesn't show disconnected devices! And it does only after entering this command with value 1!

    I need to have enabled show hidden devices in Device Manager, but so it doesn't show everything. So I need to revert this command. Problem is as I said: setting it to 0 does nothing! And I even created enviromental variable with value 0 to disable it. Even after restart: device manager still show disconnected devices!

    https://docs.microsoft.com/en-us/win...hidden-devices
      My Computer


  2. Posts : 1,244
    Windows 10 Pro x64 21H2 (Build: 19044.1415)
       #2

    SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
    This is environment variable, which means you either set it or do not set it.
    To undo setting, close down command prompt and start it again, which is equal to removing the variable.

    But it still shows disconnected devices! (When I click view/show hidden devices). Problem is even normally this doesn't show disconnected devices! And it does only after entering this command with value 1!
    That's right, run devmgmt.msc from new command prompt (without setting variable to 1 or anything else) and "non present" devices will no longer be visible, only hidden ones if you enable viewing them.

    - - - Updated - - -

    You can also run following to remove variable:
    Code:
    set DEVMGR_SHOW_NONPRESENT_DEVICES=
    and then run device manager in same console
    Code:
    devmgmt.msc
    same thing, except you don't restart console.
      My Computer


  3. Posts : 548
    Windows 10 Pro 64 bit 19042.1415
    Thread Starter
       #3

    zebal said:
    This is environment variable, which means you either set it or do not set it.
    To undo setting, close down command prompt and start it again, which is equal to removing the variable.


    That's right, run devmgmt.msc from new command prompt (without setting variable to 1 or anything else) and "non present" devices will no longer be visible, only hidden ones if you enable viewing them.

    - - - Updated - - -

    You can also run following to remove variable:
    Code:
    set DEVMGR_SHOW_NONPRESENT_DEVICES=
    and then run device manager in same console
    Code:
    devmgmt.msc
    same thing, except you don't restart console.
    Tried both ways and it doesn't work!!! I removed environmental variable, but it was set 0... Previously without environmental variable, it didn't work also, even after restart...
      My Computer


  4. Posts : 1,244
    Windows 10 Pro x64 21H2 (Build: 19044.1415)
       #4

    I removed environmental variable, but it was set 0
    Then you didn't remove it, can you explain how exactly did you learn it's set to 0?

    Note that there must not be anything after = (equal sign), not even a blank space!
    set DEVMGR_SHOW_NONPRESENT_DEVICES=

    To view to what is it set run:
    Code:
    echo %DEVMGR_SHOW_NONPRESENT_DEVICES%
    if the output is %DEVMGR_SHOW_NONPRESENT_DEVICES% then you know it's not set, any other value (0, 1, A, B, -2 etc.) means it's set.

    How do you know the device in question is "not present" instead of "hidden" in device manager?
    I can't test because I don't have any non present devices on my system.

    Please also make sure DEVMGR_SHOW_NONPRESENT_DEVICES is not set in system properties ex. system wide.
      My Computer


  5. Posts : 548
    Windows 10 Pro 64 bit 19042.1415
    Thread Starter
       #5

    zebal said:
    Then you didn't remove it, can you explain how exactly did you learn it's set to 0?
    From google, as I found only way to remove it enter 0. I clicked on 20 links, none said: put nothing behind "="!

    I did it exactly as you said, no space behind "="!!!

    Then it is bugged output says what you said:
    Code:
    %DEVMGR_SHOW_NONPRESENT_DEVICES%
    When I click show hidden devices: I can see disconnected devices, which I didn't see before. I Am sure of that. I go to Device Manager often!

    Everyone has non present devices on the system, windows includes drivers of printers, or com ports, it will show you things you couldn't see before, when you also click in device manager to show hidden devices, which I need, but I don't want to see disconnected devices currently!

    You mean by properties that "system environmental variable is not set" ? I removed this already!
      My Computer


  6. Posts : 1,244
    Windows 10 Pro x64 21H2 (Build: 19044.1415)
       #6

    According to description from link you posted in your first post:

    To permanently set the user environment variable DEVMGR_SHOW_NONPRESENT_DEVICES to 1, use the Advanced tab of the system property sheet.
    According to this description this is likely a bug because it does not work as expected (as described in docs)
      My Computer


  7. Posts : 548
    Windows 10 Pro 64 bit 19042.1415
    Thread Starter
       #7

    zebal said:
    According to description from link you posted in your first post:



    According to this description this is likely a bug because it does not work as expected (as described in docs)
    In which docs, there is nothing that it doesn't work as expected!

    Damn this is so annoying, I need to flip it back!
      My Computer


  8. Posts : 1,244
    Windows 10 Pro x64 21H2 (Build: 19044.1415)
       #8

    Because environment variable in system setting is permenent for as long as variable is set there.

    However in your case you didn't even set it system settings, therefore it shouldn't have cause any permanent effects to begin with.
    Because setting the variable in command prompt is supposed to be valid for as long as command prompt and any programs run from it are opened.

    This is pretty much unexpected behavior.
    You can try to use system restore.
      My Computer


  9. Posts : 548
    Windows 10 Pro 64 bit 19042.1415
    Thread Starter
       #9

    zebal said:
    Because environment variable in system setting is permenent for as long as variable is set there.

    However in your case you didn't even set it system settings, therefore it shouldn't have cause any permanent effects to begin with.
    Because setting the variable in command prompt is supposed to be valid for as long as command prompt and any programs run from it are opened.

    This is pretty much unexpected behavior.
    You can try to use system restore.
    LOL even previous backup didn't help, maybe it was not this command what caused it! I know for a fact, I used this command yesterday for a first time and backup is day older!
      My Computer


  10. Posts : 1,244
    Windows 10 Pro x64 21H2 (Build: 19044.1415)
       #10

    Odd enough, but maybe this setting was saved in your user profile and was not restored.

    In device manager click on File -> options
    Here delete saved data.

    close down device manager then log off and log in again.
    If this doesn't work I have no other suggestions other than reinstalling Windows.

    - - - Updated - - -

    You can also try to create new standard user account, log in and start device manager as standard user (not as Admin)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 14:38.
Find Us




Windows 10 Forums