Update Registry for Current Logged on User

BatchPatch Forums Home Forums BatchPatch Support Forum Update Registry for Current Logged on User

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8861
    Kevin Hyland
    Participant

    Hi

    BatchPatch has the option to show me the current user (Get Information > Get Logged on User)

    Is it possible to extend this to show the SID of this user? And from there, can BP then give the option to update the registry of HKUSID of Current User

    It’t not to do anything exciting – just preload additional languages which I can manually do using

    psexec \computer$ -s reg add “HKU$currentusersidKeyboard LayoutPreload” /f /v 2 /t REG_SZ /d 00000491

    psexec \Computer$ -s reg add “HKU$currentusersidKeyboard LayoutSubstitutes” /f /v 00000491 /t REG_SZ /d 00000809

    Thank you for any assistance

    Kevin

    #10190
    doug
    Moderator

    Hi Kevin – Thanks for the suggestion. We will consider this for a future build.

    -Doug

    #10191
    Kevin Hyland
    Participant

    I’ve botched a DOS batch file which does the job – the coding is not tidy by a long way but it does the job! Just putting it here in case anybody else finds it useful.

    @echo off

    set uber=%1

    set uSID= 

    Set foobar=

    for /F “tokens=1* skip=1” %%a IN (‘psloggedon \%uber% -l -x -nobanner’) do @set foobar=%%a

    set foobar=%foobar:hiew2k=%

    for /F “usebackq delims== skip=1” %%i in (psgetsid.exe \%uber% %foobar%) do @set uSID=%%i

    psexec -nobanner -accepteula \%uber% -s reg add “HKU%uSID%Keyboard LayoutPreload” /f /v 2 /t REG_SZ /d 00000491

    psexec -nobanner -accepteula \%uber% -s reg add “HKU%uSID%Keyboard LayoutSubstitutes” /f /v 00000491 /t REG_SZ /d 00000809

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.