@echo off
cd /d "%~dp0"
reg add "HKLM\SOFTWARE\Classes\Excel.Sheet.12\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\EXCEL.EXE\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\Excel.Sheet.8\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\EXCEL.EXE\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\PowerPoint.Show.12\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\POWERPNT.EXE\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\PowerPoint.Show.8\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\POWERPNT.EXE\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\Word.Document.12\shell\Open\command" /f /ve /t REG_SZ /d "\"%CD%\WINWORD.EXE\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\Word.Document.8\shell\Open\command" /f /ve /t REG_SZ /d "\"%CD%\WINWORD.EXE\" \"%%1\""
exit