Click here to Skip to main content
14,578,402 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Screen Saver Timeout really irritating Pin
obermd3-Apr-20 4:13
Memberobermd3-Apr-20 4:13 
GeneralRe: Screen Saver Timeout really irritating Pin
Howard Wolowitz3-Apr-20 5:36
MemberHoward Wolowitz3-Apr-20 5:36 
GeneralRe: Screen Saver Timeout really irritating Pin
Davyd McColl3-Apr-20 6:31
MemberDavyd McColl3-Apr-20 6:31 
GeneralRe: Screen Saver Timeout really irritating Pin
matblue253-Apr-20 9:04
Membermatblue253-Apr-20 9:04 
GeneralRe: Screen Saver Timeout really irritating Pin
MSBassSinger3-Apr-20 10:48
professionalMSBassSinger3-Apr-20 10:48 
GeneralRe: Screen Saver Timeout really irritating Pin
Mike_d_fl3-Apr-20 14:43
MemberMike_d_fl3-Apr-20 14:43 
GeneralRe: Screen Saver Timeout really irritating Pin
pmauriks7-Apr-20 19:44
Memberpmauriks7-Apr-20 19:44 
I hacked the following powershell together to fix this. The trick is that you don't need to move the mouse, you only need to move the mouse cursor to prevent the screensaver. Windows!

Quote:
$prevent_screensaver = {
#########################################################
# Prevent-Screensaver
#########################################################
# This script moves the mouse cursor
# for specified number of minutes which makes
# Windows “think” you are at your desktop
# so the screensaver does not start and the desktop
# does not get locked.
#########################################################
# Makes the script move the mouse (press “.”) for 120 minutes.
########################################################
# (c) Dmitry Sotnikov + T.H. Schmidt
# https://dmitrysotnikov.wordpress.com
########################################################
$minutes = 120

[void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)

$myshell = New-Object -com “Wscript.Shell”

for ($i = 0; $i -lt $minutes; $i++) {
Start-Sleep -Seconds 60
$Pos = [System.Windows.Forms.Cursor]::Position
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point((($Pos.X) + 1) , $Pos.Y)
}
}

# stub that will send the e-mail for logging
$email = {
$emailTo = $Env:USERNAME+"@justice.vic.gov.au"
#echo $emailTo

$messagecontent = @"

This message informs that the screensaver was locked out on PC:
"@

$emailFrom = "noreply@x.y.x"
$subject="Screensave bypass notification"
$smtpserver="mailserver.dns.name"
$smtp=new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $messagecontent)

}

# Pops up the dialog and makes the user agree to the conditions
Add-Type -AssemblyName PresentationCore,PresentationFramework
$ButtonType = [System.Windows.MessageBoxButton]::YesNo
$MessageboxTitle = "User Agreement"
$Messageboxbody = "I understand that while the screensaver is disabled on my PC it is my responsibility to ensure it is secure and supervised at all times and I promise I will be a good boy / girl"
$MessageIcon = [System.Windows.MessageBoxImage]::Warning
$button = [System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)


# calls the prevent_screensaver sub if the user selected yes.
if ($button -like "Yes") {
#echo $button
&$email
&$prevent_screensaver
}
else {
#echo "Selected: No"
#&$email
}


Hope that helps. I take no responsibility for the Security implications of this script.
GeneralRe: Screen Saver Timeout really irritating Pin
ormonds8-Apr-20 15:37
Memberormonds8-Apr-20 15:37 
GeneralRan out of toilet paper today... Pin
DRHuff2-Apr-20 4:43
MemberDRHuff2-Apr-20 4:43 
GeneralRe: Ran out of toilet paper today... Pin
PIEBALDconsult2-Apr-20 4:48
professionalPIEBALDconsult2-Apr-20 4:48 
GeneralRe: Ran out of toilet paper today... Pin
MadMyche2-Apr-20 4:55
mveMadMyche2-Apr-20 4:55 
GeneralRe: Ran out of toilet paper today... Pin
obermd3-Apr-20 4:15
Memberobermd3-Apr-20 4:15 
GeneralRe: Ran out of toilet paper today... Pin
jeron12-Apr-20 4:56
Memberjeron12-Apr-20 4:56 
GeneralRe: Ran out of toilet paper today... Pin
Eddy Vluggen2-Apr-20 5:55
professionalEddy Vluggen2-Apr-20 5:55 
GeneralRe: Ran out of toilet paper today... Pin
Stefan_Lang2-Apr-20 21:12
mveStefan_Lang2-Apr-20 21:12 
GeneralRe: Ran out of toilet paper today... Pin
dandy722-Apr-20 6:54
Memberdandy722-Apr-20 6:54 
GeneralRe: Ran out of toilet paper today... Pin
Eddy Vluggen2-Apr-20 13:15
professionalEddy Vluggen2-Apr-20 13:15 
GeneralRe: Ran out of toilet paper today... Pin
dandy723-Apr-20 3:07
Memberdandy723-Apr-20 3:07 
GeneralRe: Ran out of toilet paper today... Pin
W Balboos, GHB2-Apr-20 6:55
mveW Balboos, GHB2-Apr-20 6:55 
GeneralRe: Ran out of toilet paper today... Pin
DerekT-P2-Apr-20 11:33
professionalDerekT-P2-Apr-20 11:33 
GeneralRe: Ran out of toilet paper today... Pin
Mark_Wallace2-Apr-20 18:03
MemberMark_Wallace2-Apr-20 18:03 
GeneralThought of the Day Pin
OriginalGriff2-Apr-20 4:42
mveOriginalGriff2-Apr-20 4:42 
GeneralRe: Thought of the Day Pin
PIEBALDconsult2-Apr-20 4:50
professionalPIEBALDconsult2-Apr-20 4:50 
GeneralRe: Thought of the Day Pin
OriginalGriff2-Apr-20 5:01
mveOriginalGriff2-Apr-20 5:01 
GeneralRe: Thought of the Day Pin
dandy722-Apr-20 6:44
Memberdandy722-Apr-20 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.