Windows 10: Emulate monitor cable disconnect via powershell/cmd

Discus and support Emulate monitor cable disconnect via powershell/cmd in Windows 10 Drivers and Hardware to solve the problem; Hello, is there a way to make my windows think my monitor was unplugged/plugged again software side? A little bit of background to explain why i'd... Discussion in 'Windows 10 Drivers and Hardware' started by Julie Zelená, May 20, 2020.

  1. Emulate monitor cable disconnect via powershell/cmd


    Hello,

    is there a way to make my windows think my monitor was unplugged/plugged again software side?


    A little bit of background to explain why i'd want to do such a ridiculous thing:

    My problem is my monitor loses signal upon windows boot.

    All works fine until just before windows takes over hp startup, then my monitor goes "no video signal".

    I can still wait, hear windows login, put in acc and pass by memory and have it log in...i can do pretty much everything, except i have to go by memory because i cannot see anything.

    The video signal does not come back even if i wait for hours.

    Nothing changes if i turn the monitor off.

    Nothing changes if i power the monitor off.

    But when i unplug the DVI cable, i hear the "pnp disconnect" sound.

    When i plug the cable back in, i hear the "pnp connect" sound and screen starts working again.


    I've tried solving the root issue, because "replug the video cable whenever i reboot my system" is not an acceptable solution for me.

    Updating graphic drivers did nothing already up to date.

    Uninstalling and reinstalling graphics drivers did not help.

    Reimaging my windows did not help well, worked for first boot, then back to "normal".

    Getting new monitor did not help.

    Getting new DVI cable did not help.

    Getting another extremely old monitor and using VGA to plug it in did not help worked exactly the same - signal lost upon boot.

    I'm not going to buy new motherboard got integrated graphics nor willing to buy graphics card just for this.


    So, is there a way i could make my system think the cable got unplugged/plugged again? Maybe some service handling the connection that could be restarted? Or some device that could be disabled/enabled? By the "pnp disconnect" sound i'm 100% positive my system immediately knows i've unplugged the cable - but how does it know?

    :)
     
    Julie Zelená, May 20, 2020
    #1

  2. CMD and PowerShell

    Hi Andre,

    I did all items you listed.

    After reboot, running CMD and powershell (admin) had the same result ("no app associated"). So I turned the feature off in taskbar settings.

    Regards,

    Danker
     
    dschaareman, May 20, 2020
    #2
  3. Derek12 Win User
    PowerShell instead of Commandline in Creators Update

    For what I use cmd (ipconfig, ping, diskpart...) PowerShell works just fine
     
    Derek12, May 20, 2020
    #3
  4. RickC Win User

    Emulate monitor cable disconnect via powershell/cmd

    Settings using powershell/cmd?

    Yes, you could use PowerShell, a BAT/CMD file or other method (I use AutoHotkey 'cos I find the syntax easier than PowerShell plus I can create GUIs with toggles/options/buttons, etc.)

    As @dalchina mentions, the secret is finding the registry locations where the settings are amended. There are tools like Active Registry Monitor that will help but probably the simplest (and cheapest... it's free) is to use Sysinternals/TechNet's Process Monitor (ProcMon).

    Rather than reinvent the wheel, have a look at these tutorials/videos about using Process Monitor:

    Using your example of Win 10's Power light, the process (using ProcMon) would be:

    1. Start ProcMon.
    (Tip: Create a shortcut to Procmon.exe, set it to 'Run as administrator' and append -NoConnect to the target. This will start ProcMon as elevated and, more importantly, NOT monitoring.)

    Emulate monitor cable disconnect via powershell/cmd [​IMG]


    2. Turn off monitoring for everything except the registry, i.e. on the toolbar leave just Show Registry Activity enabled:

    Emulate monitor cable disconnect via powershell/cmd [​IMG]


    3. Add RegSetValue as a filter. (Perhaps easiest is to just download, unzip and import this filter: RegSetValue.zip.)

    4. Open Settings and navigate to System > Display.

    5. Amend window sizes so both the Settings and Procmon windows are visible/not overlapping:

    Emulate monitor cable disconnect via powershell/cmd [​IMG]


    6. In ProcMon, click on the Capture button (or use CTRL+E).

    7. In Settings, click on the Night light toggle switch.

    8. Wait a second or two then, in ProcMon, click on the Capture button (or use CTRL+E) to stop capturing.

    9. Right-click on the captured RegSetValue results and choose Jump To... . This will open the Registry Editor at the keys you need to examine.

    (My test showed that the process invoked a change in two registry keys:

    Emulate monitor cable disconnect via powershell/cmd [​IMG]


    This is because toggling the Night light switch in Settings > System > Display also toggles a setting in Settings > System > Display > Night light settings.)

    Using this process you can build PowerShell, BAT/CMD, AHK scripts to implement the changes you want without even opening the Settings app.

    Hope this helps...
     
    RickC, May 20, 2020
    #4
Thema:

Emulate monitor cable disconnect via powershell/cmd

Loading...
  1. Emulate monitor cable disconnect via powershell/cmd - Similar Threads - Emulate monitor cable

  2. How to disconnect work or school account via Powershell

    in Windows 10 Software and Apps
    How to disconnect work or school account via Powershell: Hello,I wonder if there is the the equivalent of the Disconnect button see picture with a powershell or other script ?I saw that people are telling to delete the content of "C:\Users\*\AppData\Local\Packages\Microsoft.AAD.BrokerPlugin*". In fact after executing it I don't see...
  3. VBoxManage: Control VirtualBox via CMD or PowerShell

    in Windows 10 Ask Insider
    VBoxManage: Control VirtualBox via CMD or PowerShell: [ATTACH] submitted by /u/sn0oz3 [link] [comments] https://www.reddit.com/r/Windows10/comments/12znloy/vboxmanage_control_virtualbox_via_cmd_or/
  4. View active usb hardware via powershell and Cmd

    in Windows 10 Gaming
    View active usb hardware via powershell and Cmd: I can't see the attached usb dongle via cmd and powershell. I need to get serial number with commandI couldn't get it with the following commandimport subprocess printsubprocess.getoutput"C:\Windows\\SysWOW64\\wbem\\wmic.exe diskdrive get...
  5. View active usb hardware via powershell and Cmd

    in Windows 10 Software and Apps
    View active usb hardware via powershell and Cmd: I can't see the attached usb dongle via cmd and powershell. I need to get serial number with commandI couldn't get it with the following commandimport subprocess printsubprocess.getoutput"C:\Windows\\SysWOW64\\wbem\\wmic.exe diskdrive get...
  6. frequent network disconnection via ethernet cable

    in Windows 10 Gaming
    frequent network disconnection via ethernet cable: Good evening, I constantly disconnects about every 2 minutes the connection via ethernet cable. I don't know how to solve it, I have already reset the network card, changed the modem, changed the ethernet cable, changed the usb c - ethernet adapter, only by changing the...
  7. frequent network disconnection via ethernet cable

    in Windows 10 Software and Apps
    frequent network disconnection via ethernet cable: Good evening, I constantly disconnects about every 2 minutes the connection via ethernet cable. I don't know how to solve it, I have already reset the network card, changed the modem, changed the ethernet cable, changed the usb c - ethernet adapter, only by changing the...
  8. Open Cmd via PowerShell, command?

    in Windows 10 BSOD Crashes and Debugging
    Open Cmd via PowerShell, command?: Please i need to open cmd win + r and so i know i need to know how to open it via powershell pls (.bat and so i know it needs to be opened via powershell. Pls PowerShell command to open cmd? Cmd über PowerShell öffnen, Befehl?
  9. External Monitor Not Working Via HDMI Cable

    in Windows 10 Installation and Upgrade
    External Monitor Not Working Via HDMI Cable: Summary: After updating from 1703 to 1809 we are experiencing an issue where the external monitor has stopped working. The end user has an HP Elitebook x360 1030 G2 device connected to an external monitor via HDMI cable. The external monitor was working fine before the...
  10. CMD and PowerShell

    in Windows 10 BSOD Crashes and Debugging
    CMD and PowerShell: Hi all, I run Windows 10, v 1803. Clicking Start, typing CMD, there is only "Command Prompt (desktop application)". Win key + X shows "Windows PowerShell" and "Windows PowerShell (Admin)". If after Win key+R I choose Windows PowerShell" pops up a message: Same with...