Danny Tsang
image_alt_text

Overview

I have been busy migrating from Windows 7 RC to full retail version of Windows 7. It has taken over 1.5 full days (which includes half a day formatting a brand new 1TB hard drive).

During the course of putting things back onto my speedy fresh install I found a problem when I started up Thunderbird. There were duplicate system folders such as Local Inbox, Sent box, etc. Because they are system folders there is no option to delete. It had been a while since I started it back up from my old install and got some emails in only one of the 2 Inboxes.

After a while I found the problem. It was Dropbox and the way it handles conflicted files / folders.

Prerequisites

Take a back up of the profile which contains everything for a user. This includes emails, settings and more. To find where the user profile is go to Tools > Account Settings.

For each account listed click on the Server Settings and at the bottom on the right side of the window there is a textbox with the label Local directory: Copy the directory after ~\Profiles\. Make sure Thunderbird is not running before a copy is taken.

Do not forget to backup the Local Folders too. Select Local Folders and there is a textbox with the same label.

Removing Duplicate Folders

Close Mozilla Thunderbird if it’s still open. Inside the profiles directory there is a folder called Mail. This is where each email account has it’s own folder and there is also the local folder where emails are stored on the computer. Go into each of those folders and look for files or folders where it has the computer name and the description conflicted copy and a date stamp. Check which copy is the latest version (and where the back up may come in handy) using date time stamp of the file, size of the file and the conflict date stamp. Delete the duplicate or remove the original and rename the conflicted file exactly the same as the original file.

Summary

A slight pain but it’s worth it if it allows me to access my email offline on multiple computers.

1

Mar/10

PDF Printer In Ubuntu

Filed Under Linux at 1st March 2010 0:01 by Danny
Tags: , , ,

It is really simple to add a PDF printer in Ubuntu 9.10. A PDF printer prints a page and writes to a file in PDF format. To install this feature typer in the terminal:
sudo apt-get install cups-pdf

That’s it. It should install and even add the printer automatically.

Overview

I wanted to have the Windows partition and the user partition on separate drives. I have done this in the past on a Linux computer and it was very painless.

The advantage to this setup is that most of the personal data such as things stored in My Documents, My Music, etc and the Windows specific stuff like installed programs, patches, etc are stored on a separate partition whether it’s on the same or different drive. This degree of separation allows the Windows partition to be wiped and started fresh without affecting the personal files.

I had time during my fresh install to play about with various setups and have listed the options in the following section.

Be aware that not all programs store settings/preferences in the user directory so this is no replacement

I am not responsible for any damage or problems caused by the below procedure.

Final note is that I tried many combinations but some how managed to get it to work. Whilst the steps may not be 100% correct it should be a good guideline to see the process through. I shall update it should I come across it again.

Prerequisites

Before starting ALWAYS ALWAYS back up all the necessary files. Even though this design is suppose to negate the need to back it is still advised to backup in case something goes wrong.

Have a Windows 7 Install CD and CD Key ready.

Time!

Mounting Options

  1. Mounting a drive to a directory – I was very keen on using this technique when I saw in the Disk Management utility. It sounds like the method used in Linux and would make it fairly transparent to the user.
  2. Separate sub directories within users – This option makes it very simple to do because Windows 7 has the option of moving all the directories under the users one such as Pictures, Music, Search, etc. Just specify the new location and Explorer will move the files creating the directory along the way and taking care of permissions.
  3. Change the %UserProfile% in the registry so that it is pointing to another drive.

Mounting A Drive To A Directory

This was my first choice so I wiped my system and went about to do this. The steps described in the superuser website are as follows:

1. You boot with the install media.
2. At the screen with the “Install Now” choose “Repair your computer”
3. You will be asked if you want to “Repair and Restart” by the System Recovery options, choose “No”.
4. Then Make sure that Windows 7 is listed as one of the installed OS’s available for recovery, it’s selected and them press next.
5. You will be given a list of recovery tools, chose “Command Prompt”.
6. In the command prompt you will be using Robocopy to copy c:\Users to d:\Users
7. Type robocopy c:\Users d:\Users /mir /xj
8. /mir tells robocopy to mirror the directories, this will copy all files and permissions.
9. /xj is very important, this tells robocopy not to follow junction points. If you forget this, you will have a lot of trouble.
10. Make sure no files failed to copy (FAILED column = 0).
11. Remove the old Users Folder from the c: drive: rmdir /S /Q C:\Users
12. Create a NTFS Junction that points to the new Users folder: mklink /J C:\Users D:\Users

The problem with the above method is the drives letters in recovery mode may not be using the correct drive letters when in normal Windows. For example drive C: is the windows drive and drive Z: was the user drive. In recover mode it generally assigns drive letters incrementally so in order to get the drive to mount on Z: the user drive needs to be on the 24th SATA port. This is unrealistic.

Also after performing those steps you would find the user to be locked out because of the user mapping has changed. To fix this boot into safe mode and login and do the following steps outlined in Nigel’s blog

What now? Well I found additional registry entries with REGEDIT under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

There was 1 line for each profile. Crucially if a profile is bad there are 3 things worth checking
a) Ensure the key name doesn’t end in “.bad”
b) Ensure the RefCount value is 0
c) Ensure the State value is 0

Having gone through all those steps it made the OS unstable. I’m not sure if it’s a hardware issue but there seemed to be long seek times or Windows was taking a lot longer to follow the symbolic link. Whilst it worked, it hangs and long load times was not acceptable to me.

Separate Sub Directories Within Users

This is the easiest setup and I started with using this as my solution when the above method did not work for me. The problem with this was that it left the user directory e.g C:\Users\Danny on the same drive as the Windows partition and I do use that directory (as well as my Desktop which can be mapped to another drive) as my dumping ground. Not totally satisfied I found a workable solution described below.

Change the %UserProfile%

This is the final approach I took. It worked in the end but there was a lot of confusion when I did it but I ended up with the result I wanted.

Before changing the variable the files must be copied to the new drive. To do this I used the above method of dropping into command line, copying the files to the new location. Follow steps the steps in Mounting A Drive To A Directory section. Before closing the registry edit the attribute ProfileImagePath in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList to the path of the new user directory. Reboot and it should be done.

Summary

Whilst the last method worked. I’d like to go through it again to ensure the steps are correct but I’m sure it more or less sums it up. I’m happy I got the result I wanted but wished the symbolic link worked. I’m looking at separating the install directories as well such as the typical C:\Program Files directory so that the Windows partition only contains Windows related files.


Mount second drive as c:/Users in Windows 7.

Fixing User Profiles in Vista

18

Feb/10

Header Image 14

Filed Under Website at 18th February 2010 17:36 by Danny

Digitally round object now in the rotation queue.

17

Feb/10

O2 iPhone Tariff To Simplicity Settings

Filed Under Mobile Phone at 17th February 2010 0:01 by Danny
Tags: , , , ,

Changing from iPhone tarriff to Simplicity requires changes to the APN settings which govern the data and MMS settings.

Change all idata.o2.co.uk username to mobile.o2.co.uk.

MMS, change idata.o2.co.uk to wap.o2.co.uk.

Data Settings for Pay & Go and Pay Monthly (non iPhone tariff) customers