i am trying to create a package in Tanium to add registry key and values. below is the code that i am using and this is all saved as ms11-124.py
import winreg as rg
createnewkey = rg.CreateKeyEx(rg.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ALLOW_USER32_EXCEPTION_HANDLER_HARDENING",0,rg.KEY_ALL_ACCESS)
creatingkeyvalue = rg.SetValueEx(createnewkey,"iexplorer.exe",0,rg.REG_DWORD, "1" )
createnewkey2 = rg.CreateKeyEx(rg.HKEY_LOCAL_MACHINE,"SOFTWARE\\Wow6432Node\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_ALLOW_USER32_EXCEPTION_HANDLER_HARDENING",0,rg.KEY_ALL_ACCESS)
creatingvalue = rg.SetValueEx(createnewkey2,"iexplorer.exe",0,rg.REG_DWORD, "1" )
to call this attached .pyfile : cmd /c ..\..\Python27\Tpython.exe ms15-124.py
When I run the package to a test machine, the deployment says its successfully completed with exit code 0 but when I login to server to check the registry key, no changes are found there. Need help in executing/calling the script successfully.