How can i Save User ProfileList and check every logon if exist? Tagged: registry userprofile This topic contains 1 reply, has 2 voices, and was last updated by Don Jones 1 week, 3 days ago. Author Posts August 3, 2017 at 11:30 am #76561 morph goksuParticipant I'm trying to save every sid under: "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList\" to some directory and I'm trying to control every logon my backup SID's exist or not under profilelist. if it's not than I must import my saved profiles. I tried with batch script which I wrote, but my script doing this when an user login and it isn't good way to do this! I am sharing it for you to understand what I want to do. (script 1 must run with the user account without admin privileges.) @echo on IF EXIST D:\Users\ (goto dvar) else goto quit :dvar echo dvar setlocal enabledelayedexpansion echo %username%>D:\Users\username.txt for /f "tokens=2 delims= " %%i in ('whoami /user /fo table /nh') do set usersid=%%i echo %usersid%>>D:\Users\username.txt echo %userprofile%>>D:\Users\username.txt IF EXIST D:\Users\%username% (goto GetUserinf) else goto quit :GetUserinf for /f "tokens=1 delims=." %%a in ('echo %userprofile%') do set newpath=%%a IF %newpath%==%userprofile% (goto quit) else goto run :run Dprofile2.bat :quit exit _________________________________________________ (script 2 must run with admin privileges.) @echo on ( set /p user= set /p usersid= set /p oldpath= ) I think with shell scripting this is really easy job but i dont know shell.. Can you help me please? I stuck so hard... August 7, 2017 at 12:52 am #76813 Don JonesKeymaster This site is not about batch files; it's about Windows PowerShell, which is an entirely different technology. Have you considered posting in a more general-purpose site, such as ServerFault.com? Author Posts You must be logged in to reply to this topic.