SSIS Script Task Error

Problem:

Today, I encounter the error as below in editing the Script Task:

Cannot show Visual Studio 2008 Tools for Applications Editor.

Additional Information:
The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDTE80)

Solution:

The following solution fixed the problem from http://www.sqldev.org/sql-server-integration-services/cannot-show-visual-studio-tools-for-application-editor-1076.shtml

=======================

I've used the following command script to clean upcached VSTA configurations for SSIS with success. From a command prompt (under WoW32 on 64 bit platforms)with admin privileges (make sure to run the command prompt as an administrator if you have UAC enabled)run a batch file with the following content:

@rem start batch file
@rem delete the VSTA registrycache from the current user
REG DELETE HKCU\Software\Microsoft\VSTA /f
REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f

@rem delete the VSTA registration cache for SSIS script task and data flow script component
REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f

@rem delete the cached files from the HDD
rd /s /q "%AppData%\Microsoft\VSTA"
rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptTask"
rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptComponent"

rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTA"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptTask"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptComponent"

@rem re-generate the VSTA files for SSIS script task and component
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptTask /setup
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptComponent /setup

@rem end batch file
=================