Windows immidiately logs out after logging in (partition letter change)
Yesterday I had a fight with my windows box after imposing it to change the /windows partition letter from D:\ to the default C:\ and finding out Windows to be so stupidly coded.
Clever move you would think, indeed it wasn’t, however many programs are coded so badly that they seek and put things directly into C:\ without checking the %windowsdir% variable. So stupid!
I changed the drive letter with Acronis Partition Manager, but after doing so I was locked out from the system since immediately after the login windows was logging me out.
I figured out not only some ugly programs are coded so badly, but also Windows is! (what a surprise)
The problem emerged to be that in the system registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Winlogon\Userinit:Reg_SZ:C:\WINDOWS\system32\userinit.exe
as you can see userinit.exe which takes care of loading per user settings, and the whole desktop environment, is referenced with an absolute path (C:\WINDOWS) instead of something like %systemdir%\userinit.exe
How to edit the registry if you cannot login?
You would think using the administrator user… No, I’m sorry, while Linux root home folder always resides on / partition and is always accessible, Windows Administrator is also locked out by not finding userinit.exe.
I used Winternals ERD 2005 boot cd and edited the registry from there.
You can find several other alternatives too. Such as simply copying userinit.exe form the Windows recovery CD-ROM into an empty WINDOWS\SYSTEM32 folder of the drive that has acquired the D:\.
Changing this value according with the new partition letter lets you login again. However very few clever programs do work, you should replace all windows registry instances of D:\WINDOWS D:\PROGRAM D:\DOCUMENTS with the C:\. Too annoying to be done by hand. I did so with a registry editor that let me search and replace them altogether. But maybe the best thing wouldbe to leave this crap once and forever.
reference:Unable to log on if the boot partition drive letter has changed http://support.microsoft.com/kb/249321/
|
Print This Post
|
Email This Post

No Responses to “Windows immidiately logs out after logging in (partition letter change)”