raksrules
Oracle
My work laptop has an issue wherein, it will not go to Sleep even if I went to windows icon -> power -> sleep. Due to this, keeping laptop on overnight (but on sleep) was not possible as I would wake up to a dead battery always. In order to mitigate this, I got a vbs script online that can keep the laptop active by sending some keypress like NUM LOCK. Here is the script..
This works really well and laptop remains on entire night (connected to a charger but charger is turned off and on in 2 Hour cycles using a wifi switch).
The side effect of this is a popup that comes on screen (usually during night when laptop is not being used, every few days) that tells me that the laptop has not been started in last X days so it is better to restart for stability and all. I can dismiss this message but until I do so, the message will keep coming and will make a sound on laptop. So during the night, if this message comes, it will disturb the person sleeping in the room as the message comes every 30 seconds until dismissed and will make the sound.
I want that the system sound on the laptop be turned off at specific time daily (say 10 PM) and start again (say 10 AM) using some sort of script. I cannot install any software as it is work laptop so script is only option. I don't know VB script so I cannot make one myself.
Does anyone have a ready script or knows how to make one or some link where someone has posted the script?
Code:
Dim onjResult
Set objShell = WScript.CreateObject("WScript.Shell")
Do While True
objResult = objShell.sendkeys("{NUMLOCK}{NUMLOCK}")
Wscript.Sleep (10000)
Loop
This works really well and laptop remains on entire night (connected to a charger but charger is turned off and on in 2 Hour cycles using a wifi switch).
The side effect of this is a popup that comes on screen (usually during night when laptop is not being used, every few days) that tells me that the laptop has not been started in last X days so it is better to restart for stability and all. I can dismiss this message but until I do so, the message will keep coming and will make a sound on laptop. So during the night, if this message comes, it will disturb the person sleeping in the room as the message comes every 30 seconds until dismissed and will make the sound.
I want that the system sound on the laptop be turned off at specific time daily (say 10 PM) and start again (say 10 AM) using some sort of script. I cannot install any software as it is work laptop so script is only option. I don't know VB script so I cannot make one myself.
Does anyone have a ready script or knows how to make one or some link where someone has posted the script?