I started setting up a kscript to deploy some software settings via the registry.

I am just using the built in regisrty options not a batch file.

The problem I am experiencing is that on a 64-bit system when kace is told to write to HKEY_LOCAL_MACHINE\SOFTWARE\SoftwareTitle it instead writes to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\SoftwareTitle


is there a way to force this to write to the correct section of the registry? The software doesnt look at the location that is being written to.


Any help is appreciated, thanks

Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



in the configuation policy use HKLM64

Answered 05/02/2013 by: SMal.tmcc
Red Belt

  • make sure you set this script to work for only 64 bit OS's under the os versions
    btw your question statement is backwards, your script is writing to the 32 bit portion of the registry WOW6432NODE is the 32 bit area on a 64bit machine
    • This content is currently hidden from public view.
      Reason: Removed by member request
      For more information, visit our FAQ's.
    • Hello. I'm trying to run this script. Having HKLM in the script kills the script running against 64bit machines. If I take out the registry checks it does run the command. If I add HKLM64 it dies as well. What should my exact syntax here be? Thank you.

      $userops = Get-ItemProperty -Path 'HKLM64:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform' -Name 'UserOperations'

      if($userops.UserOperations -eq 0)
      Set-ItemProperty -Path 'HKLM64:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform' -Name 'UserOperations' -value 1
      Get-Date > C:\userops.txt
      echo "`nThe MS Office reg key was originally zero, it was changed to one:`nHKLM64:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\UserOperations" >> C:\userops.txt
      cmd.exe /C 'C:\Program Files\Common Files\Microsoft Shared\OFFICE14\osaui.exe' /f

      else {out-null}
Please log in to comment
Answer this question or Comment on this question for clarity


Should be a simple process. You can add this to your powershell script (at the top line of the script) to relaunch PS in x64 if invoked from x86, as KACE will do as a 32bit binary. Then finish your script as you would normally, and it should write to x64 instead.

if ($PSHOME -like "*syswow64*") {
    Write-Output "Relaunching x64"
    & (Join-Path ($PSHOME -replace "syswow64", "sysnative") powershell.exe) `
        -File $Script:MyInvocation.MyCommand.Path `
# Begin Script 
{do stuff}
Answered 01/11/2017 by: isudothings
Yellow Belt

  • That is correct, it works. Kace agent is still 32bit only, and doesn't seem Kace cares to transfer it to 64bit or at least provide both as an option. I wonder what the status of that is?
Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja