Scripting Question

Kace Script to Add a Registry Entry with the Computer Name

03/03/2020 227 views

I'm trying to create a script that will add a registry entry with the computer name:


Where "ExampleComputerName" is the computer name.

I need to create this entry on every computer within Kace and need to replace the "ExampleComputerName" with the current computer name.

Is this possible?

0 Comments   [ + ] Show comments


All Answers


via cmd/batch:

reg.exe add "HKLM\SOFTWARE\WOW6432Node\WebExSilentInstaller" /v "Name" /t REG_SZ /d "%COMPUTERNAME%" /f

via PowerShell:

$regPath = "HKLM:\SOFTWARE\WOW6432Node\WebExSilentInstaller"
New-Item -Path $regPath -ErrorAction SilentlyContinue | Out-Null
New-ItemProperty -Path $regPath -Name "Name" -Value "$env:COMPUTERNAME" -PropertyType String -Force | Out-Null



Answered 03/03/2020 by: scottcopus
Senior Yellow Belt

  • Scott, you are awesome! That worked like charm!
  • So it worked on my computer when updating the registry but when I run the script for another computer in the Kace inventory it adds MY computer name into the registry.

    Is there a Kace variable that I can use for the computer I'm adding the registry entries too?
    • Have you confirmed that your computer's name is on those remote computers' registries by manually checking them? Run the scripts locally on a couple other boxes and see if they work there.
      • We are in the process of upgrading from Kace 8 to Kace 10. I created the script on the Kace 10 server and it works perfect with a few test computers that I have on there. It was when I exported/imported into the Kace 8 server that it didn't seem to work. I will wait until everyone is on the new server to install the software. Thanks for your help!

Don't be a Stranger!

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

Sign up! or login

View more:


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