Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A new wake-up reason might get installed in the future. Instead I found some powershell code ages ago, created a `nap` function in my $profile, and set the option to not allow waking it from sleep:

    # load assembly System.Windows.Forms which will be used
    Add-Type -AssemblyName System.Windows.Forms
    
    # set powerstate to suspend (sleep mode)
    $PowerState = [System.Windows.Forms.PowerState]::Suspend;
    
    # do not force putting Windows to sleep
    $Force = $false;
    
    # don't allow the computer to be woken by devices or tasks (e.g. windows updates)
    $DisableWake = $true;
    
    # do it! Set computer to sleep
    [System.Windows.Forms.Application]::SetSuspendState($PowerState, $Force, $DisableWake) | Out-Null;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: