Possible to deploy HKCU registry changes to computer.

Comments

3 comments

  • Mark Harrison

    Hello,

    I am having the same issue.

    Whether I Use PDQDeploy's COMMAND or I use "INSTALL" and have a .BAT batch program, I get the same error (this from the "output file" after trying the deploy):

    --------------------------------------------------------------------------------------

    C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>C:\Windows\SysWOW64\reg.exe DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Novell Groupwise" /f
    ERROR: The system was unable to find the specified registry key or value.

    C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>C:\Windows\SysWOW64\reg.exe DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\BACKUP OF FLTG" /f
    ERROR: The system was unable to find the specified registry key or value.

    C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>C:\Windows\SysWOW64\reg.exe DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\FLTG" /f
    ERROR: The system was unable to find the specified registry key or value.
    --------------------------------------------------------------------------------------

    C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Novell Groupwise" /f
    ERROR: The system was unable to find the specified registry key or value.

    C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\BACKUP OF FLTG" /f
    ERROR: The system was unable to find the specified registry key or value.

    C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\FLTG" /f
    ERROR: The system was unable to find the specified registry key or value.
    --------------------------------------------------------------------------------------

     

    But, when I run the commands on the target PC itself, whether from a CMD line or run the .BAT program, the specified registry keys disappear.

    I then put the keys back in to place, rerun deploy, does not work. Same errors.

    I searched AdminArsenal for several things like "REG DELETE" and "delete registry keys" and so forth and tried several variations, but the same results.

    I also tried just deleting the whole "Profiles" reg key, same error messages.

    I *can* deploy and run other .BAT programs and installations with no problems. Just this REG DELETE thing doesn't seem to want to work.

    Thoughts, please?

    Thanks!

    - Mark

    0
    Comment actions Permalink
  • Mark Harrison

    ANSWER !!!!

    I found a .BAT program script (with the help of Google) and so a big big THANK YOU to Jared Barneck for this slick piece of work....

    https://community.landesk.com/support/docs/DOC-2417

    Here is the .BAT program which worked for me:

    --------------------------------------------------------------------

    REM Modify a registry key in for all logged in users
    REM Also modify it in the .DEFAULT hive so future users get it.
    REM
    REM Copyright Jared Barneck
    REM

    GOTO main

    :modkey
    REM %1 is the value of %a that is passed.
    reg delete "HKU\%1\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles /f
    REM Going to :end here only ends this instance of the call to the
    REM :modkey label. It does not end the whole batch file.
    GOTO end

    :main
    FOR /F "tokens=2* delims=\" %%a IN ('REG QUERY HKU ^|Findstr /R "DEFAULT S-1-5-[0-9]*-[0-9-]*$"') DO CALL :modkey %%a
    REM Going to :end here ends the whole batch file.
    GOTO end

    :end

    --------------------------------------------------------------------

    0
    Comment actions Permalink
  • Gerth Ericsson

    Thanks a lot for this update, it solved my problem as well.

    Very good link to an interesting article.

    //Gerth

    0
    Comment actions Permalink

Please sign in to leave a comment.