Solved Turn on the display when resuming from sleep


I think you are saying that the task's task history tab shows the run was successful.
The vbs is still in place in its folder?
There's nothing about it in Windows security [WD], Virus … protection, Protection history?

Make a copy of the vbs then change the original's content to just
msgbox "It runs this alright"


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
I think you are saying that the task's task history tab shows the run was successful.
The vbs is still in place in its folder?
There's nothing about it in Windows security [WD], Virus … protection, Protection history?

Make a copy of the vbs then change the original's content to just
msgbox "It runs this alright"


Denis

Yes, the task's history says the run is successful.

I have tried changing the vbs as you suggested and manually executed it, the message box works. However when making the task do its job nothing happens, not even by manually running the task from task scheduler. Everything should be in its place so I really don't understand, I've tried moving the file and editing the task to the new location but nothing.

I will further investigate when I have time, will update you if I find anything
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell g5 5590
    CPU
    intel 9th gen
    Memory
    8GB LOL
    Graphics Card(s)
    nvidia
    Hard Drives
    C: nVME kioxia SSD
    D: SATA toshiba HDD
    Browser
    Firefox
    Antivirus
    Defender (if it hasn't been disabled yet)
Oh dear.

I was thinking about putting together a tutorial but could not think where I'd find the time. Perhaps I need to think again.

Which part of this is of interest?
1 Creating an EventViewer, Custom view?
2 Attaching a TS task to an EventViewer, Custom view?
3 Editing that task in TS?
4 Editing that task in its exported xml form?
5 Waking up the display with a vbs script?

Denis

Please do, it would definitely be helpful. It was not over my head, as I've done this before, but it is a rather long, and complicated, process, and I think many people would benefit from such a tut.
 

My Computers

System One System Two

  • OS
    Windows 11 23H2 Current build
    Computer type
    PC/Desktop
    Manufacturer/Model
    HomeBrew
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spectrum ES07DC9 4K Gaming Monitor (Glossy)
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD (USB)
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Platinum
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    NZXT KRAKEN Z73 73.11 CFM Liquid CPU Cooler (3x 120 mm push top) + Air 3x 140mm case fans (pull front) + 1x 120 mm (push back) and 1 x 120 mm (pull bottom)
    Keyboard
    SteelSeries Apex Pro Wired Gaming Keyboard
    Mouse
    Logitech MX Master 3S | MX Master 3 for Business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Browser
    Nightly (default) + Firefox (stable), Chrome, Edge
    Antivirus
    Defender + MB 5 Beta
  • Operating System
    ChromeOS Flex Dev Channel (current)
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E5470
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Keyboard
    Dell
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
Yes, the task's history says the run is successful.

I have tried changing the vbs as you suggested and manually executed it, the message box works. However when making the task do its job nothing happens, not even by manually running the task from task scheduler. Everything should be in its place so I really don't understand, I've tried moving the file and editing the task to the new location but nothing.

I will further investigate when I have time, will update you if I find anything

Alright, turns out it was just me messing around with stuff, sorry. I had chose the option to run the task independently from user connection (+ do not store password) instead of "run only when the user is logged on" because I thought it would prevent the task to run when I locked my PC. After testing, I found out that logging off from windows and locking the PC are two different things, so the task works also if I lock the device before putting it to sleep.

Technet page that helped

Anyway, out of curiosity I have tried attaching the task to a single event ID (wakeup from sleep) rather than attaching it to the custom view in Event Viewer and it works fine too. In this specific case I think it gives results similar to editing the task's .xml as @Try3 suggested before
 
Last edited:

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell g5 5590
    CPU
    intel 9th gen
    Memory
    8GB LOL
    Graphics Card(s)
    nvidia
    Hard Drives
    C: nVME kioxia SSD
    D: SATA toshiba HDD
    Browser
    Firefox
    Antivirus
    Defender (if it hasn't been disabled yet)
Funnily enough, when I was thinking about a tutorial I was wondering how to most succinctly tell people always to use Run only when user is logged on. I'd be tempted to add para after para of explanation.
- Whilst it's sometimes possible to use [or to trick TS into using] the Run whether user is logged on or not setting, generally-speaking anything that uses any kind of interface cannot be run that way.
- When you lock your computer, you remain logged on. Any requirement for a password that you have set up for unlocking is an additional security check not a login as such.

I considered attaching the task to a single event but I had to get you to check that Custom view anyway and I tested the whole lot to make sure it would cause no problems so it was just easier to stick with that all the way through.

All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
Well, I learned it the hard way 😇 anyway thanks again for the clarification :)

It's fine for attaching the task to the custom view, just wanted to point that out, could have also been that I was missing something :)
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell g5 5590
    CPU
    intel 9th gen
    Memory
    8GB LOL
    Graphics Card(s)
    nvidia
    Hard Drives
    C: nVME kioxia SSD
    D: SATA toshiba HDD
    Browser
    Firefox
    Antivirus
    Defender (if it hasn't been disabled yet)
before I did my complete reset of win 11 yesterday I had a 'sleep'period move in. I didnt even think it had been set, I didnt, I hate it. The trouble I had trying to get the damn monitor on - AGH! Thats another for my list disable sleep. Now switched off...........
 

My Computer

System One

  • OS
    Win 11 x 64 Home on PC . Pro Win 11 x 64 on Surface 9.
    Computer type
    PC/Desktop
    Manufacturer/Model
    Upgraded to personal setup from made to measure.
    CPU
    amd ryzen 5 7600 6core 3701mhz
    Motherboard
    Gigabyte B650M K
    Memory
    32GB DDR5
    Graphics Card(s)
    MSI Nvidia Geforce Ventus 2X RTX 4070
    Sound Card
    ONBOARD 6 CHANNEL (5.1) HIGH DEF AUDIO (AS STANDARD)
    Monitor(s) Displays
    Coolermaster GM27-FFS 27 inch
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung V-NAND SSD 970 Evo plus 500GB
    3TB SATA-III 3.5" HDD, 6GB/s, 7200RPM, 64MB CACHE
    1 x 4TB External USB. 1 x 5TB External SSD, & BIG sticks
    PSU
    700
    Case
    Coolermaster
    Cooling
    DEEP COOL AS700 CPU COOLER
    Keyboard
    Microsoft 600K & Logitech gamer G213
    Mouse
    logitech
    Internet Speed
    640+MB
    Browser
    Chrome & Firefox
    Antivirus
    Kaspersky Plus
    Other Info
    WIRELESS 802.11 AC1300 867Mbps/5GHz, 400Mbps/2.4GHz PCI-E CARD
    Logitech L202 Speakers
    Asus DRW-14D5MT x48
    Net via Virgin Media hub 3 (using RJ45 cable). Plus MS surface 9 tablet (win 11). Amazon Fire 10.

Latest Support Threads

Back
Top Bottom