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:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

3

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
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share