Wednesday, April 25, 2012

Stress Management 101

Time management and self management is a life-skill. The earlier one is able to understand this and adapt/adopt, the complexity of life and level of personal stress will be more manageable. Many times, people fall into the trap of being unhappy and that affects personal performance turning into a vicious-cycle.

Wednesday, April 11, 2012

Bug in Vista that renames user profile (user account profile) as a backup

Reference to thread here

This issue seems to be caused by a horrendous bug in Vista that renames your User Account Profile as a backup, and then creates a new user account with the same name but with nothing in it. Here is a possible fix for this issue, but if it doesn't work, you may have to re-image the computer.

1. Boot up in Safe Mode. To do this, hit the F8 key while the computer is booting, and then scroll down to the "Safe Mode" option and press enter. On my computer the user account icon appeared, but bigger than normal, and I clicked it and it loaded my desktop in safe mode. It came up with an error bubble saying that my user account hadn't loaded properly, but i just ignored

2. Click the Start Button and in the white "Start Search" space at the
bottom type "regedit" (without the quotation marks). This will open the registry editor.

3. In the left-hand pane, navigate by clicking the little triangles next to the following folders:
Windows NT

You should now have a list of folders all starting with S-1-5- and then a number.
(You might need to drag the divider between the 2 panes of the window across so you can read the whole folder name)
Look at the end of each name and you should see one with .bak at the end of it, and there will be another one above it with exactly the same name but without .bak at the end.
The one that's got .bak at the end is your old User Profile that Vista has now made into a backup, and the one without .bak after it is the new empty User Profile that Vista has created.
Just to check that this is the case, have a look in the right-hand pane for each of the 2 folders and look at what's written after "ProfileImagePath".
For the folder with .bak at the end it should say C:\Users\ and then your
usual User Account name, and for the one that doesn't have .bak at the end it
should say C:\Users\TEMP.

What you need to do now is to rename the folders in the left-hand pane so that the one with .bak at the end changes back to being the one containing your proper User Profile and the new one without .bak at the end becomes the
backup. Do do this follow the next step:

4. Right click on the folder with .bak at the end and then click "rename", and just change the ".bak" part to ".bk" - i.e. just remove the "a" from the middle - (this is just to allow you to change the other one to have .bak at
the end). Press enter or click on some blank part of the screen for the
change to take effect.
Then, right click the one that doesn't have .bak at the end and click
"rename". Remove the .bak from the end and press enter or click anywhere on some blank part of the screen to accept the change.
Then, right click on the one that now has .bk at the end, choose "rename" and add the "a" back into the middle, so it now has .bak at the end. Press
enter or click on blank park of screen to accept the change.
Close the regedit window.

5. Click the Start Button and then "Restart". It should work now. Fingers

How to enable local administrator in Windows 7 using command line / scripting

1. Go to your Start menu and in “Accessories” list, open “Command Prompt” by right-clicking on its icon and choosing “Run as Administrator”
2. When the Command Prompt window appears, enter the command net user administrator /active:yes
3. When done, log out from your current account.
4. The Administrator account should now be present on your log in screen.

To turn the build in administrator account off, do the same except the command will be
net user administrator /active:no

Location of windows automatic backup (system restore) of user profiles

First you need to boot into safe mode and then have to enable the built-in Administrator account. Incase if you are not able to boot into the built-in Administrator account in safe mode then enable the Built-in Administrator account. So after successfully enabling it, follow the below method:
  1. First click on Start menu
  2. In the search dialog box, type regedit and press enter
  3. In regedit, go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  4. In the left pane, look for the S-1-5 folder (SID key) with the long number that has .bak at the end of the numbers.

The user profile service failed the logon error in Windows 7

This is a quick fix, delete profile and recreate. Not recommended for sites that have large number of clients as helpdesk will need to personally "touch" each instance of profile corruption.

You can quite easily fix this problem yourself, follow these steps give below: 
  • Delete the profile by using the Computer Properties dialog box. To do this, follow these steps:
    • Click Start, right-click Computer, and then click Properties.
    • Click Change settings.
    • In the System Properties dialog box, click the Advanced tab.
    • Under User Profiles, click Settings.
    • In the User Profiles dialog box, select the profile that you want to delete, click Delete, and then click OK.
  • Click StartCollapse this imageExpand this image, type regedit in the Start search box, and then press ENTER.
  • Locate and then expand the following registry subkey:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  • Right-click the SID that you want to remove, and then click Delete.
  • Log on to the computer and create a new profile.

Location of user profile registry hive

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

Monday, April 9, 2012

A computer that is running Windows Vista or Windows Server 2008 stops responding and hangs at the "Applying User Settings" stage of the logon process

In the dump file, the service control manager is trying to start up the HTTP.sys while the HTTP.sys is actually waiting on the Cryptographic service. But this Cryptographic service has not started up yet. So Cryptographic service is trying to start up to handle to request from http.sys.
But as the service control manager is starting up the http.sys and can’t handle the startup request from Cryptographic service, this cause a deadlock.

So this issue can be resolved by add dependency for the http.sys to make sure this http.sys will only try to start up itself when the Cryptographic service is up.
Step as below:
1.Locate and then click the following registry subkey:


2.On the Edit menu, point to New, and then click Multi-string Value.
3.Type DependOnService, and then press ENTER.
4.Right-click DependOnService, and then click Modify.
5.In the Value data box, type CRYPTSVC, and then click OK.
6.Restart the computer.
Note: The reason why we used the last known good and the server was fine may because in the last known good, the Cryptographic service somehow started up earlier than usual. But we still need to take the action plan above since we never known if sometimes the Cryptographic service will start up later than http.sys again.

How to force certain windows services to start first (or otherwise)

Basically, this article will enable us to hard-code the sequence of service start-up. It will be useful in some situations.

  1. Locate relevant "Service" registry key
  2. Right click -> New -> Multi-string Value
  3. Type "DependOnService", press ENTER
  4. In value data box, type , click OK
  5. Restart the computer
Full gory details follow:
The Registry subkeys for services are located in the following path and can control how services are loaded.
To create a new dependency, select the subkey representing the service you want to delay, click Edit, and then click Add Value. Create a new value name "DependOnService" (without the quotation marks) with a data type of REG_MULTI_SZ, and then click OK. When the Data dialog box appears, type the name or names of the services that you prefer to start before this service with one entry for each line, and then click OK

The name of the service you would enter in the Data dialog box is the exact name of the service as it appears in the registry under the Services key. 

When the computer starts, it uses this entry to verify that the service or services listed in this value are started before attempting to start the dependent service. 

In addition, Windows 2000 and Windows 2003 Active Directory needs to find and use the DNS Server service. The Netlogon service can be delayed to ensure that the DNS Server service is up and running for Dynamic DNS registration and query for existing Active Directory domain controllers that are in the DNS server database. Use the DependOnService in the Netlogon and add DNS to the list of LanmanWorkstation and LanmanServer. This delays Netlogon from starting until the DNS Server service on that same computer is started and ready. 

Note Only delay the Netlogon service for DNS on a Windows 2000 or Windows 2003 Server when the DNS service is on the same Windows 2000 or Windows 2003-based server. 

Note Entries in this field are NOT case-sensitive. 

Warning Adding this entry manually may prevent the system from starting properly if you establish a "circular dependency." In its simplest form, such a problem would occur when you make two differing services dependent on one another. Neither service would be able to start as they would both require the other to be started first.

Note If you have a service that needs to start late in the boot cycle but you do not have a specific service dependency, as explained above, then choose one of the services which startup last as the data value for the value "Depends on Service". Services commonly selected are Spooler and Messenger.

Storage vMotion of a virtual vCenter (Yes, a Virtual Machine)

Yes, it can be done. We've done it. :-D

Also reference to post by Iwan Rahabok:
Can you storage vMotion the vCenter VM itself?

Friday, April 6, 2012

Modifying a Crucial M4 to fit in 7mm slot/bays

Picture credits below go to this post:
Lenovo T420s with 7mm Crucial M4 Mod --

Top Panel removed showing spacer:

Opened up:

Put electrical insulation tape (prevent possible short circuit):

7mm Crucial M4!!: