Author Archives: daniel

Windows WannaCrypt attack

This is interesting, and perhaps not unexpected: a vulnerability in Windows SMB 1 (used for shared drives) which was patched by Microsoft in March April, has been exploited.

It’s hit unpatched computers in numerous countries – most infamously, the UK’s National Health Service.

Despite what some Australian media is reporting, this tracker shows we are not immune — though it may be a reduced impact for now thanks to the weekend. Could be a different story on Monday.

For now it appears to have stopped thanks to someone finding a “kill switch”, but no doubt it or another version will hit again.

The lesson here for any of your computers that are connected to a network:

Patch them. Keep them up to date — preferably set them to automatically install patches.

If you’re using XP or older, Microsoft has just issued a patch, which you can get here.

You can also disable SMB 1 — note there are server and client portions, and that later versions of Windows make this a lot easier than earlier ones.

If you’re using Vista or older, find out about getting an upgrade. Vista patches stopped being issued earlier this year. You’ll be safe from this specific attack if you’re patched, but maybe not the next one. (Windows 7 keeps going until 2020.)

My assumption is that home users who use a broadband modem of some kind may not be at immediate risk this time from outside attack, since the modem can function as a basic firewall, but accidentally running an infected file from an email or web site could bring it in.

This attack has been serious, and other future ones will be too. So stay up to date, and stay safe.

  • Blatant plug: If you’re in southeast Melbourne and have no idea how to fix your computer, my brother-in-law runs this company that may be able to help: Bayside PC Services
  • In this blog post, Microsoft basically tells governments that they shouldn’t keep discovered vulnerabilities secret and exploit them for themselves (as the NSA did in this case, until that information was stolen) — that they should instead tell vendors so they can be fixed quickly. Difficult to argue with that.
  • Update May 2021: This new article notes that it is still a threat

Windows 10 close desktop: default action

In previous versions of Windows, they made it easy to change the default power option to be Log Off. This is handy for me – we tend to leave our PCs on, but logged off most of the time (with the power settings such that they put themselves to sleep).

Not so in Windows 10. If you Alt-F4 (close window) on the desktop, it’ll default to Shut down.

Worse, they’ve renamed all the options so that you can’t use a letter as the initial for Log Off. S now stands for not just Switch User and Sleep, but also Sign Out and Shut Down!

Thankfully there is a way to change the default. It involves going into the Registry.

  • Go to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
  • If it doesn’t already exist, create a DWORD Start_PowerButtonAction
  • Defaults are as follows (in decimal): 1 = Sign out, 2 = Shut down, 4 = Restart, 16 = Sleep, 64 = Hibernate, 256 = Switch user

Beats me why they didn’t build that into the UI somewhere.

Unfortunately it doesn’t affect the Start / Power button.

For ease of use, we also created a prominent Log Off short cut on the desktop/Start menu, pointing to:

C:\Windows\System32\shutdown.exe -l

(That’s a lowercase L)

Logitech Harmony 650 universal remote

Logitech Harmony 650 universal remoteI bought myself a Logitech Harmony 650 universal remote, $59 at Officeworks (RRP $89.95).

The packaging and some of the promotional material says it replaces 5 remotes, but it’s had a firmware upgrade and now replaces 8, so I think it’s pretty good value.

Although Logitech sells a range of remotes, I decided $59 was a sweet spot for what I wanted to do. This model can’t control Bluetooth devices such as the Wii U, or those controlled via WiFi/LAN such as Sonos — you’ll need to spend up on a more complex model for that, but personally I couldn’t justify the $240+ investment.

To set it up you plug it into a PC/Mac and install a setup program which guides you through it. All pretty easy, and even works with my obscure no-name PVR.

Curiously it didn’t recognise my Panasonic Blu-ray player, but it made an educated guess as to what IR sequences would match, and that worked well.

It lets you set up Devices, then group them into Actions (eg Watch a Blu-ray: turn on the Blu-ray player, turn on the TV, switch it to AV, turn on the Receiver, switch it to HDMI1/Blu-ray).

The defaults for some of the actions are a bit odd, for instance the menu navigation for Watch a Blu-ray turned out to default to navigating the TV menus. This can be overridden to a more logical setting.

One issue I’ve noted: the TV takes a really long time to start up… easily 10-15 seconds to be ready for viewing. It looks like the remote doesn’t allow enough time before changing to the appropriate input/channel, and the TV misses this step. You can insert delays in some parts of Activity sequences, but it appears not here.

Clone to a bigger drive, and convert MBR to GPT

I wanted to partly upgrade Windows to a new drive.

Currently, Windows itself and Program Files are on C: drive, which is an SSD (which I meant to blog about in detail, but never got around to) and documents are on D: drive (which was the tricky bit of the SSD upgrade — to do it properly involves using SysPrep with an Unattend.xml configuration file that tells Windows that documents will live on D: not C:. This article describes it in detail.

Anyway that’s really irrelevant to the problem at hand, which is that D: drive had run out of space. Here’s a brief description of what I did:

  • The new drive is a 4 Tb drive, replacing a 1 Tb drive.
  • Plug the new drive in, use Clonezilla to clone the old D: onto the new drive. Following the detailed instructions, this all went pretty smoothly.
  • But… the catch is the old drive was formatted in MBR, which has a limitation of 2 Tb. For beyond that, you need GPT.
  • I looked around for tools to convert the drive. It’s easy if you’re prepared to wipe it, but I wanted to preserve the data I’d just moved across. Finding ways to do it without wiping everything was tricky, but I settled on the free version of Minitools Partition Wizard — this has an easy-to-understand interface, and did the job
  • Once that MBR is converted to GPT, you can enlarge the partition to make the whole drive available.
  • Unplug the old drive, move the new one into the same slot as the old (this is on a Mac Pro booting in Windows Bootcamp) and it works. Done!

PS. Similar exercise afterwards shuffling the OS X partition from a 320 Gb drive to the old 1 Tb. That required GParted, as it seems the GPT partition couldn’t be expanded due to a formatting issue (which GParted helpfully offered to fix as it started up) and another small 600 Mb partition being in the way — not sure what it is, but it seems to be essential for booting OS X — GParted was able to move it to the end of the disk.

Install updates and shutdown actually means start updating, then shutdown part way through

Last night my laptop said it wanted to install updates. So when I’d finished using it, I chose “Install Updates and Shutdown”, thinking it would be all finished and ready to go in the morning, right?

Wrong. When I started it back up this morning, it proclaimed that it was 1% through the updates, and “This will take some time.”

It took almost an hour to get through everything, but finally it got to the log on screen.

At that point I had to do something else, so I shut it down again. Later I booted it back up, logged on, and … more delay, as it went through a protracted “Getting things ready” phase.

Maybe this is a rarity given this is apparently the Windows 10 “Anniversary Update“, which brings a whole bunch of new functionality — none of which, so far, I think I actually need.

But the lesson for next time is to use “Update and Restart” (which truly is something Windows 8 and 10 have over Windows 7) rather than “Update and Shut down”, which clearly doesn’t do what I thought it would do.

Compress PDF files

Just a quick mention of a cool online tool I found…

I was about to email off a PDF (that I hadn’t created myself) to a discussion list when I noticed it was 6 Mb… which seemed a tad excessive.

Digging around I found SmallPDF, which can shrink them down. It got down to 1.2 Mb, with no noticeable loss of detail/fidelity.

SmallPDF is free for two files per hour, with no watermarks, or USD$6 a month for unlimited, and they have a few other related PDF functions such as file conversions.

Worth a look if you need to do something like this.

LG TV insists on turning itself off

We’ve got an LG TV being used in the office for displaying system information from a Raspberry Pi plugged into the back. The Pi is powered via USB from the TV.

We’ve used the timer to get it to switch on at 6am on weekdays, off at 5:45pm, reflecting the hours people are in the office.

It was consistently switching itself off at the wrong time, exactly two hours after it came on.

Turns out it’s a long-running bug in LG televisions.

In the forum, some found if they could get into the service menu, they could remove the 2 hour sleep setting.

Others found setting it to “hotel mode” would disable all timers – in our case this would waste a lot of power though.

New laptop – bloatware to remove

My old laptop was old when I got it, and I just realised that was four years ago. I tried to breathe a little more life into it by putting Linux on it… with some success, but I’ve got some stuff I need Windows for, and that crawls along these days.

So I bought a new cheap laptop, for web and email use (definitely not an attempt at a desktop replacement)… a Lenovo B41-30.

Vital stats: A$299 (which seems to be an okay price; apparently it’s $100 off) from Centrecom. 14 inch screen. Celeron N3050, 1.6 GHz, 2 cores. 500 Gb hard drive. Intel graphics. Windows 10 (x64).

Only 2 Gb RAM, but I’ve paid A$35 for a 4 Gb stick – why wouldn’t you? Unfortunately it only likes alike sticks in the two slots, so the original 2Gb had to come out. Perhaps I might put another 4 in there to make it 8. You can always do with more RAM, right?

Anyway, after setting it up, here’s the bloatware I’ve removed:

  • BT Locker – locks your computer if your phone is too far way, using Bluetooth I assume
  • Cyberlink Power2Go – for ripping CDs and DVDs… not actually very useful on a laptop with no optical disc player.
  • PowerDVD – DVD/media player – ditto.
  • McAfee LiveSafe
  • AppExplorer – recommends apps to install – all I want on this thing is the basics. I certainly don’t want it being clogged up with extra apps.
  • Lenovo Solution Center
  • Lenovo ReachIt
  • Lenovo ShareIt

That’s all for now. It’s running at an acceptable speed.

Git: prune those old branches

TortoiseGit’s right-click sometimes appears to freeze.

It can be caused by too many old branches hanging around.

Here’s how to prune the ones that have been merged to master:

git branch --merged master |grep -v master | xargs git branch -d

Obviously you’ll want to make sure your master branch is up to date.

Thanks to my colleague UA for finding that one.

TortoiseGit claims commit message is empty

I was wondering why TortoiseGit* was complaining that my commits had no message in them.

“Aborting commit due to empty commit message.”

Turns out the new version by default strips out messages starting with a # character.

As detailed in this issue report, the over-ride is in Settings / Dialogs 2.

TortoiseGit options

*yeah, I’m not a hardcore Git user, though I do prefer Git Bash on Windows for some operations

Streaming TV and Chromecast – Stan won’t support iPad HDMI

I was in contact with Stan (streaming TV) support over the weekend. The iPad wouldn’t play, whether connected via an HDMI cable or the Chromecast. It would play zero to a few frames, then freeze up.

They suggested doing a factory reset on the Chromecast and removing and re-installing the Stan app.

It sounded unlikely (it’s the real-life version of the IT Crowd’s “Have you tried turning it off then on again”), but to my surprise, it actually worked.

HDMI was still a problem though. They said it wasn’t supported.

So why doesn’t Stan support HDMI? An interesting answer came back:

“We are unlikely to support this method of streaming in the future due to DRM (Digital Rights Management) contractual agreements we have with the studios we licence our content off of. If anything changes, we will be sure to let you know.”

This is puzzling, given their main competitors Netflix and Presto seem to support it.

It’s worth noting that Stan (and I believe the others) don’t support my 2011-model Samsung smart TV either. Thank goodness for the Chromecast. It’s not as easy as being able to play directly just on the TV (with no other devices required), but at least it works — and navigating menus is far easier on a tablet than a TV remote control.

As one observer (I forget who) noted — there’s little point paying extra for a smart TV (over a dumb one) when an A$49 device like a Chromecast is less likely to become obsolete — or if it does, it can be cheaply and easily replaced.

Enable Stereo Mix on Windows 7 under BootCamp

After rebuilding my Mac Pro with Windows 7 on an SSD (more about this later), Stereo Mix went missing.

To re-enable it, I ended up changing the audio driver to the Microsoft High-Definition Audio drivers, then back to the Realtek drivers:

  • Control Panel / Device Manager
  • Browse to Sound Video and Game Controllers
  • Choose Realtek High Definition Audio / Change (you’ll need an admin password at this point)
  • Update driver / Browse / Let me pick, and choose High Definition Audio Device.
  • Let it finish, then go back in again but at the last step choose Realtek High Definition Audio. This time I found it needed a reboot.

I assume this updates you to the drivers that came with Windows, rather than those that came with Boot Camp.

After the reboot, Stereo Mix is available. You just need to enable it under Control Panel / Sound / Recording devices, right-click, Show disabled devices, then enable it. You can set it as the default so you can record things in Audacity etc.