iglezz
Спасибо! Добавил SetShellVarContext и теперь все как надо.
[more=Скрипт]
; Script for setting up DivX Decoder
Name "DivX Decoder"
BrandingText ""
SetCompressor /SOLID LZMA
OutFile "C:\1\Output\setup.exe"
InstallDir "$PROGRAMFILES\DivX Decoder"
ShowInstDetails show
ShowUnInstDetails show
Function .onInit
MessageBox MB_YESNO|MB_ICONQUESTION "This will install $(^Name). Do you wish to continue?" IDYES +2
Abort
FunctionEnd
Section -Files
SetOutPath "$INSTDIR"
File "DivX\PROGRAMFILES\config.exe"
SetOutPath "$SYSDIR"
File "C:\1\DivX\SYSDIR\divxdec.ax"
RegDLL "$SYSDIR\divxdec.ax"
File "C:\1\DivX\SYSDIR\DivXMedia.ax"
RegDLL "$SYSDIR\DivXMedia.ax"
File "C:\1\DivX\SYSDIR\DivXsm.exe"
File "C:\1\DivX\SYSDIR\divxsm.tlb"
File "C:\1\DivX\SYSDIR\qt-dx331.dll"
SectionEnd
Section -PostInstall
SetShellVarContext all
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX Decoder" "DisplayName" "DivX Decoder"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX Decoder" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
CreateDirectory "$SMPROGRAMS\DivX Decoder"
CreateShortCut "$SMPROGRAMS\DivX Decoder\Configuration.lnk" "$INSTDIR\config.exe"
CreateShortCut "$SMPROGRAMS\DivX Decoder\Uninstall.lnk" "$INSTDIR\uninstall.exe"
SectionEnd
Section -Run
ExecWait '"$SYSDIR\DivXsm.exe" /register'
SectionEnd
#### Uninstaller code ####
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Section Uninstall
SetShellVarContext all
ExecWait '"$SYSDIR\DivXsm.exe" /unregister'
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX Decoder"
Delete "$INSTDIR\uninstall.exe"
Delete "$SYSDIR\qt-dx331.dll"
Delete "$SYSDIR\divxsm.tlb"
Delete "$SYSDIR\DivXsm.exe"
UnRegDLL "$SYSDIR\DivXMedia.ax"
Delete "$SYSDIR\DivXMedia.ax"
UnRegDLL "$SYSDIR\divxdec.ax"
Delete "$SYSDIR\divxdec.ax"
Delete "$INSTDIR\config.exe"
Delete "$SMPROGRAMS\DivX Decoder\Configuration.lnk"
Delete "$SMPROGRAMS\DivX Decoder\Uninstall.lnk"
RMDir "$SMPROGRAMS\DivX Decoder"
RMDir "$INSTDIR"
SetAutoClose true
SectionEnd
[/more]
Спасибо! Добавил SetShellVarContext и теперь все как надо.
[more=Скрипт]
; Script for setting up DivX Decoder
Name "DivX Decoder"
BrandingText ""
SetCompressor /SOLID LZMA
OutFile "C:\1\Output\setup.exe"
InstallDir "$PROGRAMFILES\DivX Decoder"
ShowInstDetails show
ShowUnInstDetails show
Function .onInit
MessageBox MB_YESNO|MB_ICONQUESTION "This will install $(^Name). Do you wish to continue?" IDYES +2
Abort
FunctionEnd
Section -Files
SetOutPath "$INSTDIR"
File "DivX\PROGRAMFILES\config.exe"
SetOutPath "$SYSDIR"
File "C:\1\DivX\SYSDIR\divxdec.ax"
RegDLL "$SYSDIR\divxdec.ax"
File "C:\1\DivX\SYSDIR\DivXMedia.ax"
RegDLL "$SYSDIR\DivXMedia.ax"
File "C:\1\DivX\SYSDIR\DivXsm.exe"
File "C:\1\DivX\SYSDIR\divxsm.tlb"
File "C:\1\DivX\SYSDIR\qt-dx331.dll"
SectionEnd
Section -PostInstall
SetShellVarContext all
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX Decoder" "DisplayName" "DivX Decoder"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX Decoder" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
CreateDirectory "$SMPROGRAMS\DivX Decoder"
CreateShortCut "$SMPROGRAMS\DivX Decoder\Configuration.lnk" "$INSTDIR\config.exe"
CreateShortCut "$SMPROGRAMS\DivX Decoder\Uninstall.lnk" "$INSTDIR\uninstall.exe"
SectionEnd
Section -Run
ExecWait '"$SYSDIR\DivXsm.exe" /register'
SectionEnd
#### Uninstaller code ####
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Section Uninstall
SetShellVarContext all
ExecWait '"$SYSDIR\DivXsm.exe" /unregister'
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX Decoder"
Delete "$INSTDIR\uninstall.exe"
Delete "$SYSDIR\qt-dx331.dll"
Delete "$SYSDIR\divxsm.tlb"
Delete "$SYSDIR\DivXsm.exe"
UnRegDLL "$SYSDIR\DivXMedia.ax"
Delete "$SYSDIR\DivXMedia.ax"
UnRegDLL "$SYSDIR\divxdec.ax"
Delete "$SYSDIR\divxdec.ax"
Delete "$INSTDIR\config.exe"
Delete "$SMPROGRAMS\DivX Decoder\Configuration.lnk"
Delete "$SMPROGRAMS\DivX Decoder\Uninstall.lnk"
RMDir "$SMPROGRAMS\DivX Decoder"
RMDir "$INSTDIR"
SetAutoClose true
SectionEnd
[/more]