rem setup fulltrust
regsvr32.exe "%ProgramFiles(x86)%\cmscab\MSCDOL.dll"
regsvr32.exe "%ProgramFiles(x86)%\cmscab\ContractDol.dll"
rem --- disable publisher check ---
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing" /v State /t REG_DWORD /d 0x00023e00 /f
reg add "HKEY_CURRENT_USER\Console" /v LoadConIme /t REG_DWORD /d 0 /f
rem --- set word VBA & ActiveX
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Security" /v AccessVBOM /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Security" /v VBAWarnings /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Security" /v AccessVBOM /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Security" /v VBAWarnings /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Security" /v AccessVBOM /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Security" /v VBAWarnings /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Security" /v DisableAllActiveX /t REG_DWORD /d 0x00000000 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Security" /v UFIControls /t REG_DWORD /d 0x00000002 /f
rem --- cms 2.0 smart doc ---
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\ContractSmartDoc\*" FullTrust -n ContractSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\ContractSmartDoc\*" FullTrust -n ContractSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\ContractSmartDoc\*" FullTrust -n ContractSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\ContractSmartDoc\*" FullTrust -n ContractSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp on
rem --- cms 1.0 smart doc ---
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\ContractDocAction\*" FullTrust -n ContractDocAction.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\ContractDocAction\*" FullTrust -n ContractDocAction.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
rem --- oa smart doc ---
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\Cachet\*" FullTrust -n Cachet.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\Cachet\*" FullTrust -n Cachet.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
rem --- audit smart doc ---
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\AMISDocAction\*" FullTrust -n AMISDocAction.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\AMISDocAction\*" FullTrust -n AMISDocAction.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
rem --- tech smart doc ---
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\PTRSmartDoc\*" FullTrust -n PTRSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\PTRSmartDoc\*" FullTrust -n PTRSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp off -ag 1.1 -url "%UserProfile%\Local Settings\Application Data\Microsoft\Schemas\PTRSmartDoc\*" FullTrust -n PTRSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp on
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp off -ag 1.1 -url "%UserProfile%\AppData\Local\Microsoft\Schemas\PTRSmartDoc\*" FullTrust -n PTRSmartDoc.NET
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\caspol -pp on
rem --- RMS ---
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\DRM" /v CorpCertificationServer /t REG_SZ /d "http://rms.petrochina/_wmcs/Certification" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\DRM" /v CorpLicenseServer /t REG_SZ /d "http://rms.petrochina/_wmcs/Licensing" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\DRM" /v DisablePassportCertification /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\DRM" /v Disable /t REG_DWORD /d 0x00000000 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common\DRM" /v CorpCertificationServer /t REG_SZ /d "http://rms.petrochina/_wmcs/Certification" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common\DRM" /v CorpLicenseServer /t REG_SZ /d "http://rms.petrochina/_wmcs/Licensing" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\DRM" /v DisablePassportCertification /t REG_DWORD /d 0x00000001 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\DRM" /v Disable /t REG_DWORD /d 0x00000000 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\DRM" /v CorpCertificationServer /t REG_SZ /d "http://rms.petrochina/_wmcs/Certification" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Mi