I've created a K1000 bat script to make a couple of registry edits.

When I run it, the log says it runs successfully, but the registry does not get changed.

When I look on the target machine in the C:\ProgramData\Dell\KACE\scripts\xxx directory, I can see the script file has been copied. If I then run the script file from a command prompt on the target machine, it runs, and the registry gets changed. I'm logged into the target machine with the same credentials I'm using to run the K1000 script. Why isn't the script running from the K1000?

Thanks!
5 Comments   [ + ] Show Comments

Comments

  • Update: The script itself is running. I was able to add some test output to demonstrate this:

    ====================
    @echo off

    echo Adding key > READ1.txt

    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ExcelDataAnalysisAddIn" /v "Version" /d "1" /t REG_SZ /f

    echo Adding key data > READ2.txt

    REM reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ExcelDataAnalysisAddIn" /v "StubPath" /d "REG ADD \"HKEY_LOCAL_MACHINE\Software\Microsoft\Office\16.0\Excel\Options\" /v Open /t REG_SZ /d \"/R \"C:\Program Files\Microsoft Office\Office16\Library\Analysis\ANALYS32.XLL\"\""

    echo All done > READ3.txt
    ====================

    and I see the READx.txt files show up, with the expected contents in them. So the script is running. Why isn't it changing the registry like it does if I run the script locally?
  • I changed my test output:

    ====================
    echo %USERNAME% > READ1.txt
    ====================

    and re-ran the script. Ah, perhaps a clue!

    C:\ProgramData\Dell\KACE\scripts\665>type READ1.txt
    tech1

    C:\ProgramData\Dell\KACE\scripts\665>whoami
    win10clean\tech1

    So I changed my credentials in the K1000 to be ".\tech1" instead of just "tech1", but it made no difference.
  • Append /reg:64 at the end of each reg add command
  • Have you tried running it as local system ?
  • is UAC enabled on the local device?
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity