Set WshShell = CreateObject("Wscript.Shell") Set fso = Wscript.CreateObject("Scripting.FilesystemObject") fName = WshShell.SpecialFolders("Desktop") & "\SIDlist.txt" Set b = fso.CreateTextFile(fName, true) b.writeblanklines 1 b.writeline string(61,"*") b.writeline "Lists all the user accounts, their SIDs and Profile paths." b.WriteLine "SID-List.vbs - Copyright © 2009 AlexData.com" b.WriteLine "http://www.alexdata.com" b.WriteLine " " b.WriteLine " " b.WriteLine "Go here in the registry to change the user-file location" b.WriteLine "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" b.WriteLine "Select the SID that corresponds to your username, in the list below" b.WriteLine "And browse to that SID-Folder in the registry, then change the ProfileImagePath value" b.WriteLine "From %systemvolume%\blah to D:\MY-USERS" b.WriteLine " " b.writeline string(61,"*") b.writeblanklines 1 strProfileBranch = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colAccounts = objWMIService.ExecQuery _ ("Select * From Win32_UserAccount") For Each objAccount in colAccounts If objAccount.Name = "HelpAssistant" or objAccount.Name = "SUPPORT_388945a0" then else b.writeline "Username : " & objAccount.Name b.writeline "SID : " & objAccount.SID b.writeline "Profile dir : " & GetHomePath(objAccount.SID) b.writeblanklines 1 end if Next Function GetHomePath(strSID) On Error Resume Next GetHomePath = WshShell.ExpandEnvironmentStrings(Trim(WshShell.RegRead (strProfileBranch & strSID & "\ProfileImagePath"))) On Error Goto 0 End Function b.writeline string(61,"*") b.close WshShell.Run "notepad.exe " & fName Set fso = Nothing set Wshshell = Nothing