Archives

Windows Server 2008 R2 WinSXS folder too big? Want to delete it? Here’s how.

Is that Disk Cleanup button missing on your drive properties?
Do you have a huge Windows\Winsxs folder or are struggling for space?

diskCleanup

Well, if Disk Cleanup is missing from your system, or doesn’t look like the picture above, you can download a hotfix from Microsoft given a few simple preconditions.

The WinSxS folder can contain many old Windows Update files that are no longer needed. Disk Cleanup can help you safely remove those, and a lot more!

 

Note – this may not entirely delete the WinSXS folder, but it does kill anything it can, safely.

Turning another PC on or off in your house remotely (Wake On Lan)

My large desktop PC with its dual monitors is nestled comfortably in the loft conversion. On paper this room is amazing with its clean laminate flooring, funky paint colours, a large Ikea desk, office chair, comfy futon for power naps, a book case and space to swing a cat. The trouble is,  I’m too lazy to go upstairs and the lack of decent insulation means it’s too stuffy in Summer and super cold in Winter. I prefer to develop code using my Ubuntu OS laptop using Remmina to remote desktop, whilst sitting comfortably on the sofa, near both toilet and kitchen! The trouble then is shutting down the computer and starting it up again without travelling upstairs.

Shutting down the Windows PC is relatively straight forward.

  • Save the data you want
  • Close your programs.
  • In a command prompt type
    shutdown /s
  • The computer will shut down in about 60 seconds

Starting the Windows PC back up again was a different matter. I’ve heard about Wake On LAN in passing, and thought I’d give it a go, and share how I managed it.

My setup is a very typical. I have a standard router supplied by a major ISP. My PC in the loft connects to the LAN via some powerline adaptors, so is nicely ‘hard wired’. My laptop is ubuntu, and connected to the LAN via WiFi.

Enable the BIOS on the PC

Your computer’s BIOS screen may contain a configuration to enable the Wake On LAN functionality of your inbuilt Ethernet card. I took a photo of my BIOS settings for reference. You can usually access the BIOS by holding F2 or DEL on your keyboard at initial boot time. It may take a few goes if you’re not quick.

Bios

Testing from the laptop was easy, search “Wake on LAN” in the Ubuntu Software Center and you’ll find gWakeOnLAN. If you’re interested in doing this from a Windows Laptop, there’s a link to software  at the end of this blog. The installation was painless. The only downside to this package is that it provides no feedback whatsoever, so you have no idea if there’s a problem or if you’ve succeeded. This is because the program simply sends a fire-and-forget ‘magic packet’ across the LAN to your device.

To use gWakeOnLan you need to MAC address of the network card of the target PC. Typically this looks like 6 pairs of alphanumeric digits  with colons separating them. e.g. 4F:DD:80:C0:FF:2D . You can discover this magical number on Windows by using a command prompt and typing

 ipconfig /all

Write down the ‘Physical Address’ line of your primary network adapter – we’ll need this later.

After typing in the MAC address in gWakeOnLAN and clicking ‘Turn On’, I was sadly disappointed that my PC didn’t turn on. However, I forgot to tick the checkbox next to the entry….. But that didn’t help either. Then I discovered a forum post that suggested I log into my router and make sure that the PC was given the same IP address every time it asked for one. It makes little sense to me, as I’ve specified the MAC address, but maybe this enables undocumented voodoo magic juju.

Hey presto! I can now turn my PC on and off and be a real couch potato! There are some caveats and further help I think you might find useful.
1. The PC doesn’t seem to want to start from cold. Only after I’ve had it running then shut it down, does this work.
2. The PC does consume some power while in this state, so be mindful of cost/fire/death/apocalypse.
3. Just a heads-up – If you’re doing this with a USB WiFi dongle attached to your PC, you may face a blocker. Wake On WiFi might be enabled on your PC, but I’ve read this only works if it’s a proper feature of your board/card. I may be wrong about this.

Here’s some extra screenshots of configurations in Windows that might assist you in troubleshooting.

Power settings Magic Packet Configuration

Here’s some web sites I used in my journey.

WakeOnLAN tools for PCs.
Wake On Wireless LAN
Topics on Microsoft’s TechNet
Ubuntu Community Topic
This forum topic was a wealth of information

I also came across a few mobile apps which can send the magic packet. Woot.

Is your VMWare suspending when you don’t expect it to?

I recently installed Windows 8 on VMWare, and every day I would Lock my host operating system. In the morning, I’d have to resume this virtual machine.

It is easily resolved by changing the power plan, to prevent sending the computer to sleep.

On Windows 8, hover over the bottom right corner to reveal the set of ‘charms’ on the right, and click the search icon.
Then type in ‘power’ and click the settings icon. Your view should look like this:

Locating power saving options on Windows 8

Locating power saving options on Windows 8

Then change the power setting to ‘never’ as below.

Changing the Windows 8 Power plan

Changing the Windows 8 Power plan.

Hey presto, no more ‘resuming in the morning’.

Developing Windows 8 Phone Apps with VMWare 8.x

[Editor note – this is the first draft, feedback or additions appreciated, I was in a rush!]

This post is aimed at helping users who have VMWare 8.x install Windows 8 and get started with Windows Phone 8 development using the Simulator. Because the Simulator itself is a virtualized environment, you have to make a few tweaks.

Installing Windows 8

If you’re using VMWare Workstation 9.0, Windows 8 should be fully supported. I’ve not tried.
If you’re using VMWare 8, you have to have at least 8.0.4. I used 8.0.6.

  1. First Follow these instructions from Tom’s Hardware.
  2. Before you start the install, disable the floppy drive, or you will encounter this problem.
  3. Perform your Windows 8 install – I used the Pro version (good luck).
  4. When you’ve started the machine, re-enable the floppy otherwise you might not be able to install vmware tools. (See here).
  5. Install VMWare tools (you can now do drag and drop and easier resizing).

Install Visual Studio 2012

You may have to open D:\ and run setup64.exe
Installation of the product is pretty straight forward, just crack on. (Sorry if you’re a complete newbie!).

Installing the SDK

There maybe easier ways, but here’s how I did it.

  1. Start to create a new project in VS2012
  2. When chosing the project type, in the search box enter ‘phone’.
  3. You’ll see the windows phone 8.0 SDK.
  4. Click ‘Install Windows Phone SDK 8.0’ for C#
  5. Then click download windows phone SDK 8.0
  6. It takes you to a web page where you actually download the sdk
  7. You then have to close VS2012
  8. Yes, probably going to that web page to start with was a better plan 🙂

Enabling the Simulator

To allow VMWare to use the windows phone emulator and avoid “The Windows Phone Emulator wasn’t able to create the virtual machine: Generic failure” errors, add this to the VMX file when the VM is closed down.

hypervisor.cpuid.v0 = "FALSE"
vhv.enable = "TRUE"

(from http://windowsasusual.blogspot.co.uk/2013/01/how-to-launch-windows-phone-8-emulator.html)

If you want a great ‘getting started’ series of videos, I recommend this series at the Microsoft Virtual Academy, which also covers installation of the tools and writing your first apps.

Installing IIS On Windows Server 2008 R2

After installing Windows Server 2008 R2, you may be scratching your head trying to work out where Internet Information Services (IIS) is. Well, it’s not installed by default, so the natural thing would be to go to the traditional ‘add/remove windows features” dialog. However, things have changed in Windows Server 2008 R2! – You start the process by adding a role to the server.

See this link for more information.

http://technet.microsoft.com/en-us/library/cc771209.aspx

Windows Server 2008 “Your current security settings do not allow this file to be downloaded”

This is, by far, my most popular blog topic. Please leave some feedback if it helped you, or if I can improve it.

Occasionally I have to install a Web server or SQL Server on a fresh Windows Server 2008 R2 operating system, and by far the most annoying bit about it is just getting windows updates and the downloads you need onto the machine. Here’s a reminder (more for myself) how to quickly enable Internet Explorer 9 to act normally, even if it’s just temporarily.

There are a few options to get the job done. – The quickest and least secure method is at the end – via Server Manager.

Option 1 Add the site to your trusted sites

When you try and click a link, you’ll probably see this dialog.

NotAllowedToDownloadButCanAddToTrustedSite

You can simply add the current site to the trusted sites list by the Add… button.

This has the same effect as enabling file downloads manually (Option 2) but will also allow much more than just file downloads to take place, so only use this if you really do trust the site.

Option 2 Enable file downloads for the internet zone

  1. Open Internet Explorer.
  2. Click the  Cog icon and then click on Internet Options
  3. Click on the Security tab
  4. Select the Internet Zone.
  5. Click on the Custom Level… button
  6. Scroll to the Download section.
  7. Enable File download.
  8. Click OK and .
  9. Restart Internet Explorer.

SecurityTabFileDownloadOption

Option 3 Use another computer to get the downloads (recommended for maximum security)

  1. Use whatever mechanism you can to transfer the files (USB, File share, FTP, DVD, ISO mount, the list goes on….)

Option 4 Install Google Chrome

  1. Yep, them pesky settings only apply to IE!

Option 5 Disable Protection (probably the worst idea and might not help at all)

Because there are many ways in which you can have a file sent to you (not just by clicking a direct link) you may find that the only way to get the download started (other than trusting the site), is to disable protection. I’ve not encountered a situation yet where this has helped, but I’ve not tried hard enough. I’ve seen this suggested on other forums so thought I’d better include it. But see the link at point 3, this option opens up a whole can of worms. If in doubt, choose option 3!

  1. Click the Cog icon, and select Internet Options
  2. Go to the Security tab
  3. Uncheck the Enable protected mode tick box. Want to know what it really does? See here.
  4. OK the Internet Options page and Restart IE

You will now be nagged about not being protected any more. Try not to catch a cold. If you love screen shots, see this guide.

WarningForProtection

Option 6 Disable IE Enhanced Security via Server Manager

You can do this quickly through the Server Manager (from the Start Menu). The same implications apply as Option 5 above (no doubt).

IEEnhancedSecurity