/build/static/layout/Breadcrumb_cap_w.png

K-Scripting: Setting a registry key

I want this script to see if the Kace key exists.

If it does - stop.

If it does not - run the batch file, then set the key.

 

I can run this script all day long and the batch file works fine but it will never set the key.  Why is this?

I'm a Kace noob, so I'm sure it's something basic that I'm overlooking.  Help!


0 Comments   [ + ] Show comments

Answers (2)

Posted by: mpeters 10 years ago
Senior White Belt
0

This is what I'm running currently, and the resulting log with error.  I am running it as a domain admin account, but getting an error on setting the reg key.  I tried running the batch file under "on success" but then it completely ignored the remediation step of setting the registry key.


Comments:
  • I would have posted this as a comment, but it seems you can attach photos in a comment... - mpeters 10 years ago
Posted by: SMal.tmcc 10 years ago
Red Belt
0

it is running the batch file, exiting when done  and not returning to the script
put a reg.exe command in the batch file at the end.

Why are you using that key vs one more aimed towards office2010rearm?


Comments:
  • Sorry, I meant to post the logs as well. It attempts to set the key, but does not actually do it on the client computer. They key can be anything, I was just using that as a placeholder and testing on one computer before an enterprise-wide push.

    Logs:

    Started: 04/24/2013 14:57:27
    Finished: 04/24/2013 14:57:27
    Elapsed Time: 0 second
    Status: 2


    Output Log
    Running as: SYSTEM
    Checking if registry key exists 'HKEY_LOCAL_MACHINE\Software\Kace' succeeded
    Launched Process: kace2844.bat
    Setting registry key 'HKEY_LOCAL_MACHINE\Software\Kace' succeeded
    Activity Log
    Checking if registry exists: HKEY_LOCAL_MACHINE\Software\Kace
    Launching program: 'C:\ProgramData\Dell\KACE\\kbots_cache\packages\kbots\93\kace2844.bat' '' wait='false'
    Setting registry key: HKEY_LOCAL_MACHINE\Software\Kace - mpeters 10 years ago
    • that makes sense on the key name now.
      is the batch something like?

      "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\ospprearm.exe"

      cscript "c:\program files\microsoft office\office14\ospp.vbs" /act - SMal.tmcc 10 years ago
  • Exactly that! - mpeters 10 years ago
    • have you tried to run the batch file under "on success" and leave the reg change in remediation. - SMal.tmcc 10 years ago

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