/build/static/layout/Breadcrumb_cap_w.png

script.bat copied, but won't run; runs locally though

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
  • 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? - kentwest 6 years ago
  • 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. - kentwest 6 years ago
  • Append /reg:64 at the end of each reg add command - flip1001 6 years ago
  • Have you tried running it as local system ? - akmagnum 6 years ago
  • is UAC enabled on the local device? - Thorvin 6 years ago

Answers (0)

Be the first to answer this question

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ