Fix Windows 10 Slowness/Lag

Windows 10 Slowness seems to bug most users, with a constant degree of lag when flicking between tasks.  It can be stressful and disruptive to your reaching a productive, flow state.

Most modern mid-range laptops are more than capable of running multiple operating systems simultaneously, rocking Intel core i5 processors with vPro technology just like their floor standing, desk based or rack mounted workstation and server brethren so why then, is your laptop slow when all it has to do is run a single instance of Windows 10, – often on a SSD (Solid State Drive) that claims to be faster than it’s mechanical, spinning counterpart?

Many users have reverted to Windows 7 seeing as Windows 8 was such an abomination (Windows 10 is a long way from winning me over too, tbf) and are left wondering what the future holds for them from here on in, in terms of upgrade path and acceptable snappy performance.

Aside from the mammoth processors and supercharged block storage devices inside the modern affordable laptop, there is also the huge amount of RAM too.  Large RAM requirements have arisen out of the desire to run multiple applications simultaneously and flick between them, but also as a result of a widespread transition from 32-bit operating systems and applications to 64-bit – a move that in itself warrants double the amount of physical RAM in order to match the performance.

And just look at all that %Idle time?  HOW CAN IT BE SO SLOWWW?!!

Back in the 32-bit 1GB RAM days when RAM was expensive, page files were used to write pages of memory to disk, to free up precious, fast volatile RAM (You can still run many light weight distributions of Linux on that spec with very little to no slowness and minimal to no swapping to virtual memory too.  Same is true of 64 bit with 2GB RAM.)

The size of the pagefile defaulted to the amount of RAM.  This was due to the assumption that if the amount of pagefile needs to be any bigger than that, then you really do need more physical RAM as your system would have undoubtedly ground to a snails pace already.

And that is still the default.  The problem with that, is that in a laptop with a single partition, a single 8GB file used for regularly paging the chosen contents of 8GB physical memory out to it, puts a fair bit of strain on the IO subsystem – and it’s unnecessary strain.  With 8GB RAM, you’ll not need much if any page file at all, for most tasks.

So with that in mind, change your virtual memory settings from being “system managed”, so a fixed size pagefile set at the “Recommended” size.

In Control Panel, System…

These settings will need a reboot to take effect.  You should notice snappier performance as a result.


Separate IP Address Octets in Excel

If you find yourself with a spreadsheet containing hundreds of servers, and there’s an IP Address Column, you may want to create 4 additional columns, each containing each of the four octets of the IP Address.

This may be useful for grouping large numbers of hosts in a spreadsheet by subnet.

And this may be useful in grouping together servers in legacy infrastructure by application where that information doesn’t exist, since deployments of solutions across multiple servers are often grouped together in a range of IP addresses allocated to the projects by the Network admin.

These formulae are used to separate out each of the four octets.


Download the full Firefox stand-alone installer

There’s nothing more frustrating than downloading an installer that assumes that you’re going to have internet access on the machine that you subsequently intend to run the installer on (called a stub installer).

For example, downloading firefox so that you can get to your enterprise storage arrays java based admin interface without the agony presented by internet explorer’s tendency to throw its toys out the pram over the certificate and the settings are locked down by IE policy, this policy, that policy and the other policy that all exist to make the environment so much more “secure” but actually just don’t allow anything, anywhere, ever.  It’s secure!, it’s been signed off as being suitably unusable to prevent exposing ourselves to any kind of imaginary threat!  Aren’t we clever?.  No.  Rant over.

It’s secure!, it’s been signed off as being suitably unusable to prevent exposing ourselves to any kind of imaginary threat!

I’ve probably digressed, I can’t tell.  I’m too angry.  And you are too probably, if you’ve ended up here.  Installers that assume an internet connection are completely useless in the enterprise environment (best read in the voice of Clarkson).

Whats even more frustrating is that the stub installer is the only apparent option, judging by mozillas website.  Well it isn’t the only option – you can still download the full-fat, stand-alone installer from their ftp site – but ftp is blocked by your firewall!

No bother, just replace ftp:// with http:// at the beginning of the URL, or even better just click here for the 64 bit version (or here for the 32 bit version).



When Google Chrome won’t start.

So Chrome won’t start and the error message is unhelpful.  Microsoft support won’t help of course and Google’s sledgehammer approach is

“just blow away your User Data and start over”

but you don’t want to loose your bookmarks, stored passwords etc that make your life easier and more efficient.  Plus you can’t remember half your passwords anymore.

Well, here’s what that unhelpful error message should look like in a perfect world…

…It’d save a lot of pain if it did.  You’re welcome Google.

So, using Task Manager, kill off any running Google Chrome processes (from having clicked on it 20 times before realising it’s never going to start).

To get to the folder you need to rename in order to get your Chrome browser up and running again with all your bookmarks intact (mine survived ok),

Click Start, Run,

Rename the Default folder to BackupDefault

Try restarting Chrome.  Hopefully you’re sorted.

If not, Google also recommend deleting the following User Data folder.  I don’t know what will survive if you do.  Fortunately, it never came to that for me.


Users home directory folders displayed as “My Documents”

When viewing a mounted shared filesystem that contains users home directories, many of the folders will be displayed in Windows Explorer as “My Documents” instead of the logon name e.g. bloggsj.  When you’re looking for a particular users home directory and they’re all called “My Documents” it can get quite frustrating.

This occurs as a result of the users home directory containing a desktop.ini file and your windows client is designed to automatically assume you’re looking at your own home directory.  It’s basically not smart enough to figure out it’s not yours but somebody elses.  You’d think they’d patch this but they haven’t yet and it’s been this way now for years.

So, what to do (other than use command line to do everything)?

In Windows Explorer…

  1. Navigate to share eg \\Server\Users
  2. Right click on column SIZE
  3. Click on More at the bottom
  4. tick Filename
  5. Drag Filename column to the leftmost column and sort on it.  (optional)

You then get an extra column showing the real filename that will totally overcome the problem and give you the visibility you want.

You could make this the default for folders by doing this.

In Windows Explorer

  1. Press ALT (to display the old fashioned menu)
  2. choose Tools->Folder Options->View
  3. Click Apply to Folders



What groups am I a member of?

Need to know what groups you’re a member of in Active Directory, but don’t have access to AD Users and Groups management snap-in?  Try this command.  It may help to run cmd.exe as Administrator if that privilege is available to you, but may not be necessary.

gpresult /r

The output at the bottom will be something like this, along with any additional Global group names you’re a member of.


An alternative is whoami /groups which provides an output similar to this…


Note: whoami also works on Linux/UNIX systems.



Deleting Windows data where the path length exceeds 260 characters

After migrating Windows data, it can be a royal pain cleaning up the source data using del *.* /s /q /f, especially when the path length exceeds 260 (or thereabouts) characters.  You can manually shorten the folder names and keep trying, but this may be time consuming, tiring and ultimately futile.

The simplest way I’ve found to reliably delete data, irrespective of path length, is to use robocopy.

  1. cd into the directory that you want to empty
  2. create a new empty subdirectory called empty
  3. rename all other adjacent folders 1, 2, 3, 4 etc if possible
  4. robocopy empty 1 /mir /r:1 /w:1
  5. repeat for each adjacent folder, 2, 3, 4 etc.



Using Linux commands on WIndows

Wouldn’t it be nice if you could pipe the output from windows commands into non-windows commands like grep, cut, awk, sort etc that are available to you on alternative unix-based operating systems?


Download and install GNUWin32 from here and the CoreUtils package here and Grep here that should do it.  There are more packages available though here

Once installed, add the path to the bin directory to your Windows System Environment Variable Path

Environment_variables Path

A few useful commands will now be available on the command line.  My favourite is comm which compares files and can be quite flexible with the output with the -1 -2 or -3 switches to suppress lines that appear in file1, file2 or both files respectively.   You can also combine them e.g. -12 -23, 13 to affect the output, so that only the desired output is achieved.  This takes a bit of playing around with, but is very powerful and very simple.  So much so, that it is my number 1 go to tool for file comparison.  Examples shown the in the screenshots below.

comm-helpcomm-3 comm_windows

Note:  Some Windows tools such as icacls export text to a format other than ANSI.  When viewed using Notepad or Notepad++, all appears fine, but if you cat them , you’ll see there are effectively spaces between each character, meaning grep won’t work.  Such text files will need to be saved in ANSI format first.  You can do this using Notepad++.  After selecting Encode in ANSI, save it, then retry grep for a more successful pattern match!




Comparing text files using Notepad++

Notepad++ is my favourite text editor for Windows.  It’s great, it’s free and you should use it.  I’ll leave you to discover it’s cool little features, including themes under Style Configurator.  My favourite theme is khaki for its ease on the eyes when trawling through logs.  black on white gets pretty tiresome.  Syntax colour highlighting according to your coding language is a nice touch too, for spotting those elusive typos tripping up your code.

It used to include a plugin called Compare, that you could use to compare different files and highlight their differences, but this was removed due to compatibility issues.  Hopefully it’ll return.  In the meantime, it is possible to download the plugin separately, and copy it to the plugins folder under Program Files (x86)\Notepad++\plugins

Expand the zip file and copy the .dll into place…


Restart Notepad++ (it conveniently opens whatever files were open before it was closed – another nice feature).  The plugins menu now has the Compare plugin…


Files are compared and differences highlighted…


There is also a convenient navigation pane on the right hand side (not shown) that shows all the red and green areas (mismatches and differences) in the files.

Enjoy the best free text editor and file comparison functionality all in the same app and ask yourself why in 2015 Microsoft’s own Notepad bundled with Windows still doesn’t have any of these essential features built in.


Excel Password Breaker

For my 100th post on my blog here at I shall tell you how to recover the passwords used to protect the cells, worksheets and workbooks in Microsoft Excel.  Unlike every other post on my blog, I cannot claim that the vbscript used in the macro editor shown below is my own work.  If I knew the original author I’d gladly credit them, so let me know via the comments if you know who came up with this little gem and once I’ve verified that they are indeed the original author, then due credit will be awarded here!

So, you’re working to a deadline which is fast approaching and you’ve attempted to change the contents of a cell, and received the highly annoying message…

The cell or chart that you are trying to change is protected and therefore read-only



Subsequent attempts at unprotecting the spreadsheet results in you being prompted for a password that you have no idea of and neither does anyone else.

No problem.   You’re still gonna make that deadline.

Hit Alt F11 to open the Macro Editor, double click the sheet giving you a problem and paste the following vbscript code into the empty code pane.  

Note below that the tabs in your spreadsheet may not actually appear in the order that they were originally created in, so be sure you click the correct sheet/tab name.



WordPress is frankly terrible at formatting code in posts whether they be in quotes or not and syntax can be easily messed up resulting in code that then doesn’t work.

Click on the link below to go to a separate html page where the code will be properly formatted for you to cut and paste into your macro – and is guaranteed to work.






Now run the macro by clicking on the “Play” button on the toolbar (shown below).


There may be a delay of up to a minute or more but the likelihood is that within a few seconds a message box will appear and you’ll be presented with the password.  Make a note of it if you like, but in practice the cells in my spreadsheet were also automatically unlocked.