I have a task coming up where I have to manually enter an HKEY_USER key value and string value for every single Windows profile on all computers. This could take some time. I have leant to automate them all, or at least, some of the processes.
I have the adding key process (from a list of sids.txt) working:
@echo off
pushd %~dp0
for /f "usebackq tokens=*" %%A in ("SIDS.txt") do (
REG ADD "%%A\create\key\here" /f
REG ADD "%%A\create\key\here" /t REG_SZ /d "add string value here" /f
)
pause
To further speed things up I was hoping to get some help getting the SID from each user profile from here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
For each SID listed e.g.:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-2686047782-4092528985-2296408390-1413
Within the keys there is a profile-image-path value which contains the name of the Windows user profile.
What I would like to be able to do is pump the Windows profile name and the sid into a text file formatted like the following, then I can edit fairly quickly, remove non-Windows user profile entries (like default or system accounts) and run my working code above against the listings - edited to have just a list of SIDS like in the working code above.
S-1-5-21-2686047782-4092528985-2296408390-1413 mickey.mouse
S-1-5-21-2686047782-4092528985-2296408390-1411 Donald.duck
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)