Following the installation of Adobe Reader XI for compatibility reasons with one of our software programs, I wish to disable protected mode by adding registry keys.
I retrieve all the Windows session SIDs and loop through them to inject the key into each session.
Everything seems to be working; I have my keys correctly in my registry, but here's the console output that shows my system is showing an error. I don't understand why:
Here is the code snippet:*** Remote Interpreter Reinitialized ***
Command line: install "c:\waptdev\wapt-adobe-XI-wapt\WAPT\.."
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Installing WAPT files c:\waptdev\wapt-adobe-XI-wapt
2021-06-10 15:35:17,161 CRITICAL Fatal error in install script: 22: Incorrect parameter:
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 261, in reg_openkey_noredir
result = winreg.OpenKey(rootkey, subkeypath, 0, sam | winreg.KEY_WOW64_64KEY)
FileNotFoundError: [WinError 2] The specified file was not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3910, in install_wapt
exitstatus = setup.install()
File "c:\waptdev\wapt-adobe-XI-wapt\setup.py", line 25, in install
registry_setstring(HKEY_USERS,r"%s\Software\Adobe\Acrobat Reader\11.0\TrustManager" %profsid,"iProtectedView",0, type=REG_DWORD)
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 302, in registry_setstring
with reg_openkey_noredir(root, path, sam=KEY_WRITE, create_if_missing=True) as key:
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 269, in reg_openkey_noredir
return winreg.CreateKeyEx(rootkey, subkeypath, 0, sam | winreg.KEY_READ | winreg.KEY_WOW64_64KEY | winreg.KEY_WRITE)
OSError: [WinError 87] Invalid parameter
FATAL ERROR: 22: Incorrect parameter
Exit code: 3
Wapt installation information:profiles_path = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'
for profsid in reg_enum_subkeys(reg_openkey_noredir(HKEY_LOCAL_MACHINE,profiles_path)):
if not profsid.startswith('S-1-5-21-'):
continue
registry_setstring(HKEY_USERS,r"%s\Software\Adobe\Acrobat Reader\11.0\TrustManager" %profsid,"iProtectedView",0, type=REG_DWORD)
registry_setstring(HKEY_USERS,r"%s\Software\Adobe\Acrobat Reader\11.0\TrustManager" %profsid,"bEnhancedSecurityStandalone",0, type=REG_DWORD)
registry_setstring(HKEY_USERS,r"%s\Software\Adobe\Acrobat Reader\11.0\TrustManager" %profsid,"bEnhancedSecurityInBrowser",0, type=REG_DWORD)
registry_setstring(HKEY_USERS,r"%s\Software\Adobe\Acrobat Reader\11.0\Privileged" %profsid,"bProtectedMode",0, type=REG_DWORD)
Debian Server
wapt version 2.0
Administration machine: Windows 10 1909 x64
