kotkovets,
ЗЫ: Протестировал на Win7. В таком виде секция работает:
Код:
Section /o "Хранить настройки программы в INI файле" INI
${GetSecWriteSucces} INI
${If} $SUCCES_SECTION = 1
${If} ${FileExists} "$EXEDIR\PotPlayerMini.ini"
IfSilent +2
MessageBox MB_OK "Файл настроек найден, он будет скопирован в директорию установки"
CopyFiles /silent "$EXEDIR\PotPlayerMini.ini" "$INSTDIR\PotPlayerMini.ini"
${Else}
IfSilent +2
MessageBox MB_OK "Файла настроек нет, он будет создан в минимальной конфигурации"
SetOutPath "$INSTDIR"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "CheckAutoUpdate" "0"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "DVDAudioLang" "1049"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "DVDCaptionLang" "1049"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "DVDMenuLang" "1049"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "IntDXVAMPEG1" "0"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "IntDXVAMPEG2" "0"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "IntDXVAUseMode" "2"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "IntDXVAWMV3" "0"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "LastConfigPage" "382"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "LastLogoName" "PotPlayer.png"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "LastPlayListName" "PotPlayerMini.dpl"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "LastSkinXmlName" "VideoSkin.xml"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "LastSkinName" ""
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "MouseLeftDClick" "1"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "MouseLeftSClick" "4"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "MouseWheelDown" "19"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "MouseWheelUp" "18"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "PlaybackMode" "1"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "RememberPosition" "1"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "UserIDList" ""
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "VisualMajor" "1"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "VisualUse" "1"
WriteINIStr "$INSTDIR\PotPlayerMini.ini" "Settings" "Win7WorkTool" "1"
${EndIf}
${If} ${AtLeastWinVista}
SetShellVarContext current
CreateDirectory "$APPDATA\PotPlayerMini\"
Rename "$INSTDIR\PotPlayerMini.ini" "$APPDATA\PotPlayerMini\PotPlayerMini.ini"
${Else}
${EndIf}
${EndIf}
SectionEnd