on a local computer. It will leave this UserList.txt in where it was ran from.
Quote
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002 : Const Write = 2
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Ts : Set Ts = Fso.OpenTextFile("UserList.txt", Write,True)
strComputer = "."
Set objRegistry=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys
For Each objSubkey In arrSubkeys
strValueName = "ProfileImagePath"
strSubPath = strKeyPath & "\" & objSubkey
objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE,strSubPath,strValueName,strValue
Ts.WriteLine strValue
Next
Ts.close
Const HKEY_LOCAL_MACHINE = &H80000002 : Const Write = 2
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Ts : Set Ts = Fso.OpenTextFile("UserList.txt", Write,True)
strComputer = "."
Set objRegistry=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys
For Each objSubkey In arrSubkeys
strValueName = "ProfileImagePath"
strSubPath = strKeyPath & "\" & objSubkey
objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE,strSubPath,strValueName,strValue
Ts.WriteLine strValue
Next
Ts.close



Help

Back to top











