[C#] 개발자에게 유용한 마우스 오른쪽 버튼 메뉴

2008. 11. 3. 20:32Coders

1. M$ Visual studio 2005 의 MSBuild.exe 를 마우스 오른쪽 버튼에 넣기.
어쩌구저쩌구.csproj 라는 파일을 빌드할 때에 비주얼스튜디오를 열지 않고서 다음과 같은 커맨드로 빌드가 가능합니다. MSBuild 어쩌구저쩌구.csproj 이렇게 하면 되겠지요. 이를 활용하여 마우스 오른쪽 버튼에 "Build this project"라는 메뉴를 넣어주는 레지스트리 등록 파일 입니다.

MSBuild.reg

소스는 다음과 같습니다.
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VisualStudio.csproj.8.0\Shell\Build Project]
@="Build this project"

[HKEY_CLASSES_ROOT\VisualStudio.csproj.8.0\Shell\Build Project\command]
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\MSBuild.exe \"%1\""
굵은 글씨 부분에 정확한 Full path 를 적으면 됩니다.

2. M$ Depends.exe 를 마우스 오른쪽 버튼에 놓기.
특정 dll 파일이 어떤 다른 dll 에 의존하는지 볼 수 있는 Dependency Walker 입니다. 파일 여럿 배포할 때 한번 체크해 보고 내보내면 좋지요. 이를 마우스 오른쪽 버튼을 통해 등록해 주는 레지스트리 등록 파일입니다.

Depends.reg

소스는 다음과 같습니다.
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\dllfile\Shell\View Dependencies]

[HKEY_CLASSES_ROOT\dllfile\Shell\View Dependencies\command]
@="C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\Tools\\Bin\\Depends.Exe /dde"

[HKEY_CLASSES_ROOT\dllfile\Shell\View Dependencies\ddeexec]
@="[open(\"%1\")]"
이 역시 굵은 글씨 부분에 정확한 Full path 를 적으면 됩니다.
이 실행 파일 Depends.exe 는 VS6.0 에도 있습니다. 아무튼 개발자라면 좀 뒤져보면 나옵니다.

3. 컴 등록하는 Regsvr32.exe 를 마우스 오른쪽 버튼에 넣기.
dll 이나 ocx 의 컴등록을 위해 regsvr32 어쩌구 저쩌구, 또 컴 등록을 내릴 때에 regsvr32 -u 어쩌구 저쩌구 귀찮기 때문에 등록해 주는 프로그램을 만들어서 사용합니다. 뭐 그런 거 만들어서 사용하는 것도 좋지만, 그냥 마우스 오른쪽 버튼 메뉴에 넣어놓으면 되겠지요. 컴 등록을 위한 레지스트리 등록 파일입니다.(dll, ocx 파일에서 나타납니다.)

RegSrv.reg

소스는 다음과 같습니다.
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\dllfile\Shell]
@=""

[HKEY_CLASSES_ROOT\dllfile\Shell\Register Component]

[HKEY_CLASSES_ROOT\dllfile\Shell\Register Component\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\dllfile\Shell\Unregister Component]

[HKEY_CLASSES_ROOT\dllfile\Shell\Unregister Component\command]
@="regsvr32.exe /u \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\Shell]
@=""

[HKEY_CLASSES_ROOT\ocxfile\Shell\Register Component]

[HKEY_CLASSES_ROOT\ocxfile\Shell\Register Component\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister Component]

[HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister Component\command]
@="regsvr32.exe /u \"%1\""


4. 스샷


* 최근에 한번 포맷 했는데요, 이게 잘 생각이 안 나서... 다음번에 포맷하고 윈도우 새로 깔 때에 써먹으려고 포스팅 합니다. ㅎㅎ

'Coders' 카테고리의 다른 글

[C#] 문자열에서 HTML 태그 지우는 방법  (0) 2008.11.13
[MSSQL] SSMS 빠른 스타트  (0) 2008.11.03
[C#] 화살표 라인 긋기...  (0) 2008.06.23