JSI Tip 9295. Your My Documents folder opens when you log on to Windows XP?

One possible cause for the subject behavior is a change to the Userinit Value Name, a string data type, at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. The default data value is:


If the comma is missing, you will experience this behavior.

I have scripted FixUserInit.bat to check the UserInit Value Name, and if necessary, fix it.

The syntax for using FixUserInit.bat is:


FixUserInit.bat contains:

@echo off
set key="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
set ok=%SystemRoot%\System32\userinit.exe,
set was=NONE
for /f "Tokens=1-2*" %%a in ('reg query %key% /V UserInit^|Find /I "REG_SZ"') do (
 set was=%%c
if /i "%ok%" EQU "%was%" endlocal&goto :EOF
@echo UserInit was: %was%
@echo reg add %key% /V UserInit /T REG_SZ /F /D "%ok%"
reg add %key% /V UserInit /T REG_SZ /F /D "%ok%"

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.