Kevin Shan

用资源管理器打开GAC文件夹的批处理
在.NET平台下开发控件,经常需要反编译GAC中微软的类库。然而拷贝GAC中的文件很不方便。为了提高工作效率,特地写了个批处理文件来用资源管理器打开GAC中的文件直接查看。
共享在这里,给需要的人使用。注意,如果是Vista系统,请用管理员权限打开批处理文件。

@echo Please run as administrator!
@
choice /10 /1 /12 /"1,Open GAC 2,Revert GAC"
goto answer%ERRORLEVEL%
:answer1
@echo Open GAC
@
attrib -h -s %SystemRoot%\assembly\desktop.ini
@
if exist %SystemRoot%\assembly\desktop.ini del /f %SystemRoot%\assembly\temp.ini
@
ren %SystemRoot%\assembly\desktop.ini temp.ini
@
start %SystemRoot%\assembly\
@
goto end

:answer2
@echo Revert GAC
@
ren %SystemRoot%\assembly\temp.ini desktop.ini
@
attrib ++s %SystemRoot%\assembly\desktop.ini
@
goto end

:end
@echo End

posted on 2008-05-30 11:30  Kevin Shan  阅读(862)  评论(2编辑  收藏  举报