rem This file is used to install the appropriate boot policy for securemote/secureclient.
rem The input paramer values are "acceptall" and "blockinbound", default is acceptall
echo Running install_boot_policy >> %tmp%\install_boot_policy.log

set suffix=acceptall
if "%1"=="" set suffix=acceptall
if NOT "%1"=="" set suffix=%1
set policy_filename=Policy\sc_boot_%suffix%.bin

rem Because windows NT 4 stores default.bin inside %SystemRoot% and win2k/XP stores it in %SystemRoot%\drivers
rem Copy the file to both dirs to make sure it will work on all os's

echo Backup old policy >> %tmp%\install_boot_policy.log
echo copy %SystemRoot%\system32\drivers\default.bin %SystemRoot%\system32\drivers\default.bin.old  >> %tmp%\install_boot_policy.log
copy %SystemRoot%\system32\drivers\default.bin %SystemRoot%\system32\drivers\default.bin.old  >> %tmp%\install_boot_policy.log

echo Copying new policy >> %tmp%\install_boot_policy.log
echo copy %policy_filename% %SystemRoot%\system32\drivers\default.bin                    >> %tmp%\install_boot_policy.log
copy %policy_filename% %SystemRoot%\system32\drivers\default.bin                    >> %tmp%\install_boot_policy.log

echo Backup old policy >> %tmp%\install_boot_policy.log
echo copy %SystemRoot%\system32\default.bin %SystemRoot%\system32\default.bin.old  >> %tmp%\install_boot_policy.log
copy %SystemRoot%\system32\default.bin %SystemRoot%\system32\default.bin.old  >> %tmp%\install_boot_policy.log

echo Copying new policy >> %tmp%\install_boot_policy.log
echo copy %policy_filename% %SystemRoot%\system32\default.bin                    >> %tmp%\install_boot_policy.log
copy %policy_filename% %SystemRoot%\system32\default.bin                    >> %tmp%\install_boot_policy.log

echo Finished running install_boot_policy >> %tmp%\install_boot_policy.log
