Monthly Archives: December 2012

How to hibernate Windows 8

Windows 8 is Fast and Fluid. It boots much faster than its predecessors, but sometimes you just wanna make it hibernate. Unfortunately, that doesn’t seem to be an option, cause if you try, the option won’t be there

Does this means that Windows 8 doesn’t know how to hibernate? No. It means that the vast majority of the users don’t give a shit about what’s going to happen once they press the power button. They trust the OS to do what’s best for them. However, does who know what hibernate mean might be tempted to use it so, how can we enable it?

We’ll have to go Power Options (you can search of it in de Start Screen under Settings or execute powercfg.cpl):

power

From there we’ll get into “Choose what the power button does” and then “Change settings that are currently unavailable”.

power1

That’ll allow you to modify the options and there is one for hibernate. You only have to check it and the next time you try to shutdown your machine the option to hibernate will be present.

power2

power3

I’ve to say that the vast majority of the time I only sleep my machines, but if you’re gonna be away from home for a while it might be useful to have the option 😉

Starting the Windows Phone emulator without Visual Studio

I know it’s pretty simple to open Visual Studio and then launch the Windows Phone emulator, but let’s be honest… we’re pretty lazy, and sometimes it’s just convenient to launch it with just one click.

We could create a launcher on our taskbar by creating a shortcut to %ProgramFiles(x86)%\Microsoft XDE\8.0 and putting it in the taskbar. However, we’ll have to tune it a little bit more. We’ve to change the target of the shortcut (we can change it from its properties) and set it to:

"%ProgramFiles(x86)%\Microsoft XDE\8.0\XDE.exe" -memsize 1024 -createDiffDisk %localappdata%\Microsoft\XDE\dd.720x1280.1024.vhd -vhd "%ProgramFiles(x86)%\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.720x1280.vhd"

Other time it could be useful to launch it from the command line or from a script. We can do it from the PowerShell with:

Invoke-Expression "& '${Env:ProgramFiles(x86)}\Microsoft XDE\8.0\.\XDE.exe' -memsize 1024 -createDiffDisk ${Env:LocalAppData}\Microsoft\XDE\dd.720x1280.1024.vhd -vhd '${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.720x1280.vhd'"

If for some reason you’ve lost your marbles and you’re using the ancient CMD, I’ve translated the sentence into your rusty language:

"%ProgramFiles(x86)%\Microsoft XDE\8.0\XDE.exe" -memsize 1024 -createDiffDisk %localappdata%\Microsoft\XDE\dd.720x1280.1024.vhd -vhd "%ProgramFiles(x86)%\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.720x1280.vhd"

All these commands execute the 720×1280 version of the emulator, but you can also start the 480×800 and 768×1280 versions by changing the numbers 😉