전체 글
-
현재 Windows 의 사용자 계정 확인하기IT/Windows 2011. 8. 11. 02:12
간단하게 Windows 에서 제공하는 API 인 GetUserName 을 사용한다. #include #include #include #define INFO_BUFFER_SIZE 32767 int main() { TCHAR infoBuf[INFO_BUFFER_SIZE]; DWORD bufCharCount = INFO_BUFFER_SIZE; bufCharCount = INFO_BUFFER_SIZE; if( !GetUserName( infoBuf, &bufCharCount ) ) printError( TEXT("GetUserName") ); _tprintf( TEXT("\nUser name: %s"), infoBuf ); return 0; }
-
Installshield 에서 vcredist_x86.exe 설치여부 확인 코드 예제IT/Install Shield 2011. 8. 6. 13:55
아래 코드는 begin 뒤에 넣을 것 RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE ); szKey = "SOFTWARE\\Microsoft\Windows\\CurrentVersion\\Uninstall\\{3C3D696B-0DB7-3C6D-A356-3DB8CE541918}"; if ( !RegDBKeyExist(szKey) ) then if ( !LaunchAppAndWait( TARGETDIR ^ "vcredist_x86.exe", "", WAIT ) ) then MessageBox("Fail to install vcredist_x86.exe", SEVERE); endif; endif;
-
VCRedist_x86.exe 가 설치되었는지 여부를 확인하는 방법IT/Visual Studio 2011. 8. 6. 13:39
- Visual Studio 2008 의 경우. 아래 위치의 레지스트리를 확인해서 해당 레지스트리가 존재하는지 여부로 VCRedist_x86.exe 가 설치되었는지를 확인하면 된다. Check the registry: VC++2008 (sp1): HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3C3D696B-0DB7-3C6D-A356-3DB8CE541918} or VC++2008 (original): HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}
-
sxs 오류를 검사하기 위한 sxstrace 사용하기IT/Visual Studio 2011. 7. 26. 05:58
windows side by side 오류로 인해 원인을 추적하고자 할때 (어떤 dll 들이 문제를 일으키는지 확인코자 할때 ) windows 에 포함되어 있는 sxstrace.exe 를 활용한다. 사용방법은 다음과 같다. 시작 프로그램 - 실행(run) - cmd 이제 cmd 명령창에서 아래와 같이 입력해 본다. Trace -logfile:FileName [-nostop] trace 로그가 FileName 으로 저장된다. Parse -logfile:FileName -outfile:ParsedFile [-filter:AppName] trace 파일을 읽을 수 있는 형태의 파일로 저장하고, 결과를 ParsedFile 로 저장한다. -filter 옵션으로 필터링을 할 수도 있다. Stoptrace trace..
-
Windows 에서 Service 에 등록된 프로그램와 일반 시작 프로그램의 차이IT/Windows 2011. 7. 4. 03:12
Service 에 등록된 프로그램은 컴퓨터가 켜진 상태에서는 항상 실행된다. 반면에 일반 프로그램의 경우 시작 프로그램에 등록되어 있다고 하더라도 사용자가 로그인을 해야만 비로서 프로그램이 실행된다. 그러므로 Windows 의 로그인 여부와 상관없이 항상 실행중이어야 하는 필수 프로그램은 서비스로 등록하여 관리한다. 참고 : http://stackoverflow.com/questions/1000023/windows-service-vs-windows-application-best-practice