Posts tagged with: registry

Putty: Import settings from old HDD or crashed system

I have had a few times my system crashed on me and I had to re-install Windows. One of the software that I use a lot is Putty. However, migration of configuration information is a PITA in Putty because the data is stored in Windows registry. The problem is worst when you are unable to boot up from your old windows to access the registry. There are a few alternative for this such as Putty manager and Putty mods that store the config in a file. However, I still find myself falling back to using original Putty due to me being accustomed to it. So here is a simple tutorial on how to extract your Putty configuration from an old Windows.


  • your registry file must still be accessible (located in user profiles)

Steps on restoring putty configurations:

  1. On your new Windows run putty once. Then create a dummy configuration server. This is make Putty create a new configuration entry in registry.
  2. Close putty.
  3. Use windows run command (Windows Key + r) to run “regedit“.
  4. Once in registry editor, highlight “HKEY_LOCAL_MACHINE
  5. Then click File -> Load Hive…
  6. A dialog box will ask for the registry file to open. Explore to your old user profile folder. For eg, “C:\Windows.old\Users\myusername\NTUSER.DAT
  7. You will be prompted a name for this key name. Just put anything you like. In this example, we use “old-registry“.
  8. You can now expand HKEY_LOCAL_MACHINE and you will see the key file you just opened under the label  you put in step 7.
  9. Expand as such, HKEY_LOCAL_MACHINE\old-registry\Software\SimonTatham
  10. Now highlight SimonTatham on your left hand side of regedit and right-click then choose export.
  11. Export this registry entry to a file name and location of your choice. I put it in desktop and call it “putty-config“. This file will have the extension of .reg. But those who didn’t enable view extensions will not see it. That is fine.
  12. Now you can unload old-registry from your hive. Make sure “old-registry” is highlighted. Select File -> Unload Hive…
  13. Once you have unload the hive, close regedit.
  14. Use notepad to open up the registry file you just saved. For me, it’s “putty-config“.
  15. Use replace “HKEY_LOCAL_MACHINE\old-registry” with “HKEY_CURRENT_USER“. Click Replace All.
  16. Now save the file and close notepad.
  17. Right click on the “putty-config” file and select “Merge“. This will merge the registry into your new registry.
  18. Open up Putty and voila!!! Your old configurations are all back in Putty including all the session keys.

Windows 7 winsxs folder – what is it? why is it growing? how to reduce the size?

What is winsxs folder?

Microsoft made a lot of changes and enhancements in Windows Vista promising better security and usability. One of the thing previously not in prior Windows that they added is a folder called winsxs. It means windows side-by-side. Nothing much is known then about this folder but a lot of users are complaining that it keeps on growing bigger and bigger taking up to 15GB for some people. This winsxs system was then also ported into windows 7 which brings us to continue asking this question.

So what is this winsxs folder and what is so important about it that we cannot delete anything in it?

Well, I am going to give a simple nutshell explaination. If you want detailed explanation and analysis of this folder and what it does EXACTLY, then head for these links.


Basically winsxs folder contain a lot of hardlinks or junction points (as being called by microsoft) to a lot of system files. It keeps a lot of different versions of systems files which probably is used for when rolling back drivers and so on. So these files are actually just linkage to other files in your windows system. I think there are also some real physical files there but all these are managed by windows and never explained by microsoft on the structure of this winsxs folder.

Why does winsxs folder keep on growing in size?

When you look at the properties of this folder, the file size listed is not really the physical space taken up due to them being links and not physical files.

Here is an example that someone did experiment on junction points. It explain well on how windows cannot report disk space usage as opposed to linux’s link system. This is the main reason which causes confusion about winsxs.

  • Assuming there is this test D: drive with 1000MB disk space left.
  • We create an empty folder called test123.
  • Copy a file that is 100MB in size into folder test123.
  • Check the space usage and we see 900MB space left. So far so good.


  • Next we create 3 junction points in folder test123 that points to the 100MB file.
  • So we have 4 files there with 1 is actually physical file of 100MB.
  • However, when we check the disk space properties for folder test123, it report 400MB being used by this folder.
  • Check free disk space and it is still around 900MB. For explanation sake, we ignore the small space used by each junction point for the pointer file.

So you see, when checking disk space used by junction point, windows port the file size of the physical file it is pointing to. This is essentially how junction point works in windows. Not very smart design by windows engineer.

Back to the winsxs folder. You now know why when you do drivers updates and windows updates, winsxs folder size keep growing and growing. But if you check you free diskspace, the growth doesn’t tally.

How to reduce winsxs size without screwing up my Windows?

Before starting on clearing up winsxs space. You can first run a Post Windows 7 SP1 cleanup. For those who have already applied Windows 7 SP1. This will clean up virtual space of around 5GB. Because remember, 5GB reported by windows on winsxs folder does not equal REAL 5GB. In actuality, around 500MB are saved. Looks at screenies below.

DISM /online /Cleanup-Image /SpSuperseded

[cc lang=”dos” escaped=”true” width=”100%” lines=”5″]
Volume in drive C has no label.
Volume Serial Number is 1EB4-6A03

Directory of C:\

.rnd                        autoexec.bat
config.sys                  [HP Universal Print Driver]
HP2030.log                  [PerfLogs]
[Program Files]             [Users]
4 File(s)         40,638 bytes
5 Dir(s)  54,660,644,864 bytes free

C:\>DISM /online /Cleanup-Image /SpSuperseded

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7601.17514

Removing backup files created during service pack installation.
Service Pack Cleanup operation completed.
The operation completed successfully.

Volume in drive C has no label.
Volume Serial Number is 1EB4-6A03

Directory of C:\

.rnd                        autoexec.bat
config.sys                  [HP Universal Print Driver]
HP2030.log                  [PerfLogs]
[Program Files]             [Users]
4 File(s)         40,638 bytes
5 Dir(s)  55,099,588,608 bytes free


Now that you know the usage size reported on winsxs is not the correct exact storage used, do we still need to find a way to reduce the size? How do we find out exactly how much space is actually used by winsxs? My answer is yes and no.

Despite Windows over reporting the size of winsxs, it still in some way take up unnecessary space. That might be nothing when you have a 500GB HDD. However, when it comes to SSD, this is a different story. SSDs are still very expensive. Some people only have 20GB for SSD and every MB counts. So I would recommend trying to reduce unnecessary storage taken up to files that we hardly ever touch.

After some googling, the only tool that I found to be able to help clear up winsxs is winsxslite created by Christian Bering Boegh. This is basically a “bat” file running DOS commands. It depends on a few DOS command line tools which is listed in “Help” section when you run the software. I have to say this tool is amazingly complex. It take a lot of time when running it just to come up with the list of actual physical space taken up by winsxs. I tried it on a Windows 7 SP1 laptop and it took me around 5 hours to finish Stage 1 of this tool. There is another stage 2 which I did not bother to run at it is really time consuming. I did end up saving around 1GB by the end of stage 1. However, I do not recommend anyone running this as it is quite a hassle and normal user would find it difficult just to download the third party tools required to get this software running.

By now, you know what winsxs is about. Some might also be wondering why Microsoft engineers designed such an insufficient system. Something that waste resources. I don’t know if this is totally a lousy system because everyone also hated Windows Registry system when it was introduced in Windows 95. It’s not that bad once everyone got used to it by now. I guess same thing applies to winsxs. We will probably see more tools released by third party that can optimize it more efficiently. Until then I guess most of use will need to stick to it and leave it to it’s own devices. BTW, I still don’t really fancy registry and still think it sucks. LOL…