K1000 Writing to 64 bit registry rather than 32bit
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
Answers (3)
in the configuation policy use HKLM64
Comments:
-
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 - SMal.tmcc 11 years ago-
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} - bens401 9 years ago
I have solution to add HKLM64 from kace 32 bit agent via batch
Just use psexec64 + cmd reg add command
I package .bat + psexec64 file executable in zip file
Exemple to disable 3cx startup in regitry:
@echo off
cd /d %~dp0
PsExec64.exe -accepteula reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" /t REG_BINARY /v "3CXDesktopApp" /d 030000002cfbe40ce1e7d901 /f
Comments:
-
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? - bens401 7 years ago