Method to get MSI logfile while installing MS products.

Microsoft Product 을 설치 할 때는 대부분 MSI(Microsoft Installer) 를 사용하여 설치 하게 됩니다.
설치 중 발생하는 Error를 해결하기 위해서 Log File을 얻는 것은 필수 입니다.
특별히 Option을 지정하지 않았을 때, Log File은 다음의 위치에 저장이 됩니다. (물론 관련된 환경 변수를 임의로 변경 시 저장되는 위치는 설정값으로 변경 됩니다.)

  • Windows XP and Windows Server 2003
    • %TEMP%
    • %USERPROFILE%\Local Settings\Temp
    • C:\Document Settings\[User]\Local Settings\Temp
  • Windows Vista and Windows Server 2008
    • %TEMP%
    • %USERPROFILE%\AppData\Local\Temp
    •  C:\Users\[User]\AppData\Local\Temp

MSI Setup Package를 만들 때, Logging Option 지정 유무에 따라 Log File 이 생성되거나, 생성되지 않을 수도 있습니다.
그리고 Default 로 생성되는 Log File 은 Trouble Shooting 에 필요한 내용이 부족할 수도 있습니다.
따라서, Log File 을 생성하도록 지정하거나, 자세한 내용까지 출력 시키도록 명령을 내려야 합니다. 이는 다음과 같은 방법을 사용할 수 있습니다.

  • Using Command

            msiexec /Lv* [Log File] /I [application file name] 

  • Using Registry

            HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
            Reg_SZ : Logging     /     Value : voicewarmup

msiexec 명령어는 MSI File 즉, Extension 이 msi 인 File 에서만 사용 가능합니다.(대부분 Setup Application의 Extension은 exe 입니다.) 따라서 MSI File 을 추출하거나, 해당 Product 이 제공하는 Option 을 사용해야 합니다.  
 
다음은 주요(많이 문의하는) Developer Product 에 대한 Log File을 얻는 방법입니다.

  • .NET Framework 1.1 Redistributable & .NET Framework 2.0 Redistributable
    • dotnetfx.exe /C /T:[Temp Folder - Full Path]
    • msiexec /Lv* [Log File] /I netfx.msi
  • .NET Framework 3.0 Redistributable & .NET Framework 3.5
    • Option 을 제공하지 않습니다.
  • Visual C++ 2005 Redistributable & Visual C++ 2005 SP1 Redistributable
    • vcredist_x86.exe /C /T:[Temp Folder - Full Path]
    • "VCREDI~1.EXE" /C /T:[Temp Folder - Full Path]
    • msiexec /Lv* [Log File] /I vcredist.msi
  • Visual C++ 2008 Redistributable
    • vcredist_x86.exe /l [Log File]
  • Visual Studio 2005 & Visual Studio 2008
    • %TEMP% 에 VSD 로 시작하는 Log 를 저장합니다. Ex) VSD697.tmp