Interrupting Presentation Mode Windows 10 RRS feed

  • General discussion

  • So I am working on creating a script that will interrupt Presentation Mode on Windows 10. Our workstations are set to log out after 5 minutes, but our GPO can be circumvented by using Presentation Mode - it stops the computer from falling asleep or logging out.

    I've manged to create a bare-bones script that will detect if Presentation Mode is running and notify with a dialogue box. It lets Presentation Mode run for a specified amount of time, and then shuts Presentation Mode off.

    The problem is that the Mobility Center UI doesn't change to reflect the fact that Presentation Mode has been turned off. Mobility Center is where a user normally turns Presentation Mode on or off. When my code turns Presentation Mode off, the UI doesn't show any change and still claims Presentation Mode is on.

    Clicking the button in Mobility Center to turn off Presentation Mode after the script has turned it off causes the script to report that Presentation Mode has been turned back on, when in fact it has not. The script waits the set amount of time, and then reports once again that Presentation Mode has been turned off. 

    What can I do to get the Mobility Center UI to reflect the changes being made?

    • Changed type Bill_Stewart Monday, July 30, 2018 1:46 PM
    • Moved by Bill_Stewart Monday, July 30, 2018 1:46 PM This is not third-party support forum
    Thursday, June 7, 2018 2:05 PM

All replies

  • presentationsettings /stop
    presentationsettings /start


    Thursday, June 7, 2018 2:11 PM
  • Yeah, those definitely work to start and stop Presentation Settings! The problem is that the change isn't reflected in the UI, so a user has no idea if Presentation Mode is actually on or off. 
    Thursday, June 7, 2018 2:26 PM
  • That is just how it works.


    Thursday, June 7, 2018 2:29 PM
  • I mean, clearly it's not how it works when the buttons are pressed; those buttons execute the same code but are also changing the UI. 
    Friday, June 8, 2018 7:15 PM
  • Further testing has shown that when presentationsettings /stop or presentationsettings /start are entered directly into Command Prompt, the UI does change, so it's only a problem when I'm trying to execute the action through the AutoIT script I wrote. 

    Monday, June 11, 2018 2:29 PM
  • So what's your question, then?

    -- Bill Stewart [Bill_Stewart]

    Monday, June 11, 2018 3:03 PM
  • This is not a AutoIt forum.   Try running it from PowerShell.


    Monday, June 11, 2018 3:50 PM