Update Registry for Current Logged on User

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #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 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.