Enable hibernate / suspend to disk on Windows 10

I don’t know why, but the admins tend to disable hibernate via group policies from time to time. It is pretty simple to enable, but you need admin permissions.
This script first forces UAC and then enables hibernation.

@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------

powercfg.exe /hibernate on

Preparing mod_svn for compiling on windows

Well I didn’t manage it to compile mod_svn without the apache compiled source tree, but than it works fine and fast. Also Python 3 did not work. So I took 2.7
Assuming that OpenSSL 1.0.0a and zlib are compiled in that source tree as well.

C:\python27\python gen-make.py -t vcproj --vsnet-version=2008 --with-httpd=C:\build\httpd-2.2.x-sni-dev-ipv6
--with-openssl=C:\build\httpd-2.2.x-sni-dev-ipv6\srclib\openssl
 --with-zlib=C:\build\httpd-2.2.x-sni-dev-ipv6\srclib\zlib --with-apr=C:\build\httpd-2.2.x-sni-dev-ipv6\srclib\apr

Than just open subversion_vcnet.sln with Visual C++ Express Edition. Ignore all warnings about solution folders. Choose the __ALL__ project. Than change from debug to release. Start!

My sample config

LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so

LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn/>
  DAV svn

  SVNListParentPath on
  SVNParentPath /Repositories/
  SVNIndexXSLT "/svnindex.xsl"
  SVNPathAuthz on
  AuthzSVNAccessFile "C:/Repositories/authz"

  AuthName "Subversion Repositories"
  AuthType Basic
  AuthUserFile "C:/Repositories/htpasswd"

  require valid-user
</Location>

Posts Tagged win64

Archives by Month: