NSIS Installer error

itsmee

Grünschnabel
Bei diesem nsis script, wird der error angezeigt:
Error: command WriteINIStr not valid outside Section or Function
:confused:
Was ist denn jetzt schon wieder falsch?

Code:
WriteINIStr 38 47 57 59
WriteINIStr 38 77 0 59
WriteINIStr 38 92 0 59
WriteINIStr 106 87 -37 59
WriteINIStr 106 114 121 59
WriteINIStr 124 132 136 59
WriteINIStr 124 114 139 59
WriteINIStr 124 87 -38 59
GetFunctionAddress 0 0
GetDlgItem 30 143 147
ShowWindow 152 156
GetDlgItem 30 143 158
ShowWindow 152 156
GetDlgItem 30 143 163
ShowWindow 152 156
GetDlgItem 30 143 168
ShowWindow 152 156
GetDlgItem 30 143 173
ShowWindow 152 156
GetDlgItem 30 143 178
ShowWindow 152 183
GetFunctionAddress 1 0
Call 363
File $PLUGINSDIR\InstallOptions.dll
UpdateSatusText  8
Push $PLUGINSDIR\ioSpecial.ini
RegisterDLL $PLUGINSDIR\InstallOptions.dll initDialog 0
Pop $[34]
SerCtlColors 219 0 0
GetDlgItem 30 219 223
SerCtlColors 152 0 0
CreateFont 31 -40 228 231 0
SendMessage -1 152 239 235 156 0
GetDlgItem 30 219 244
SerCtlColors 152 0 0
Call 363
File $PLUGINSDIR\InstallOptions.dll
UpdateSatusText  8
RegisterDLL $PLUGINSDIR\InstallOptions.dll show 0
Pop $[30]
GetFunctionAddress 0 0
GetDlgItem 30 143 147
ShowWindow 152 183
GetDlgItem 30 143 158
ShowWindow 152 183
GetDlgItem 30 143 163
ShowWindow 152 183
GetDlgItem 30 143 168
ShowWindow 152 183
GetDlgItem 30 143 173
ShowWindow 152 183
GetDlgItem 30 143 178
ShowWindow 152 156
GetFunctionAddress 1 0
Return
Return
GetDlgItem 30 143 168
SendMessage -1 152 1633 156 -42 2
GetDlgItem 30 143 173
SendMessage -1 152 1633 156 -43 2
Return
FindWindow 30 1637 0 143 0
GetDlgItem 30 152 1644
SendMessage -1 152 1633 156 -44 2
Return
Return
GetDlgItem 30 143 168
SendMessage -1 152 1633 156 -45 2
GetDlgItem 30 143 173
SendMessage -1 152 1633 156 -46 2
Return
Return
Return
StrCmp  "$[33]" "" 0 78 0
ReadRegStr 30 2147483650 1653 1674 0
StrCmp  "$[30]" "" 78 0 0
StrCpy $[33] "$[30]"
GetDlgItem 30 143 168
SendMessage -1 152 1633 156 -47 2
GetDlgItem 30 143 173
SendMessage -1 152 1633 156 -48 2
StrCmp  "" "0" 96 0 0
Call 363
File $PLUGINSDIR\StartMenu.dll
UpdateSatusText  8
Push 
Push $[33]
Push /lastused
Push 
Push /text
Push /autoadd
Push /noicon
Push /rtl
RegisterDLL $PLUGINSDIR\StartMenu.dll Select 0
Goto 107
Call 363
File $PLUGINSDIR\StartMenu.dll
UpdateSatusText  8
Push 
Push $[33]
Push /lastused
Push 
Push /text
Push /autoadd
Push /noicon
RegisterDLL $PLUGINSDIR\StartMenu.dll Select 0
Pop $[30]
StrCmp  "$[30]" "success" 0 110 0
Pop $[33]
Return
Return
GetDlgItem 30 143 168
SendMessage -1 152 1633 156 -51 2
GetDlgItem 30 143 173
SendMessage -1 152 1633 156 -52 2
Return
Return
IfFlag 124 0 3 -1
GetDlgItem 30 143 168
SendMessage -1 152 1633 156 -53 2
GetDlgItem 30 143 173
SendMessage -1 152 1633 156 -54 2
Goto 128
GetDlgItem 30 143 168
SendMessage -1 152 1633 156 -55 2
GetDlgItem 30 143 173
SendMessage -1 152 1633 156 -56 2
IfFlag 129 0 3 -1
Return
WriteINIStr 38 77 -57 59
WriteINIStr 38 92 183 59
WriteINIStr 106 114 121 59
WriteINIStr 124 132 136 59
WriteINIStr 106 87 -58 59
WriteINIStr 124 114 140 59
IfFlag 0 154 4 -1
WriteINIStr 124 114 140 59
WriteINIStr 124 87 -59 59
WriteINIStr 38 1763 137 59
WriteINIStr 1773 1781 1786 59
WriteINIStr 1773 87 -60 59
WriteINIStr 1773 1798 1803 59
WriteINIStr 1773 1807 1813 59
WriteINIStr 1773 132 1817 59
WriteINIStr 1773 114 1820 59
WriteINIStr 1773 1824 183 59
WriteINIStr 1830 1781 1786 59
WriteINIStr 1830 87 -61 59
WriteINIStr 1830 1798 1803 59
WriteINIStr 1830 1807 1813 59
WriteINIStr 1830 132 1838 59
WriteINIStr 1830 114 1803 59
Goto 163
WriteINIStr 124 87 -62 59
WriteINIStr 1773 1781 1842 59
WriteINIStr 1773 87 -63 59
WriteINIStr 1773 1798 1803 59
WriteINIStr 1773 1807 1851 59
WriteINIStr 1773 132 1817 59
WriteINIStr 1773 114 1820 59
WriteINIStr 1773 1824 183 59
WriteINIStr 38 1763 1779 59
GetFunctionAddress 0 0
GetDlgItem 30 143 147
ShowWindow 152 156
GetDlgItem 30 143 158
ShowWindow 152 156
GetDlgItem 30 143 163
ShowWindow 152 156
GetDlgItem 30 143 168
ShowWindow 152 156
GetDlgItem 30 143 173
ShowWindow 152 156
GetDlgItem 30 143 178
ShowWindow 152 183
GetFunctionAddress 1 0
Call 363
File $PLUGINSDIR\InstallOptions.dll
UpdateSatusText  8
Push $PLUGINSDIR\ioSpecial.ini
RegisterDLL $PLUGINSDIR\InstallOptions.dll initDialog 0
Pop $[34]
SerCtlColors 219 0 0
GetDlgItem 30 219 223
SerCtlColors 152 0 0
CreateFont 31 -40 228 231 0
SendMessage -1 152 239 235 156 0
GetDlgItem 30 219 244
SerCtlColors 152 0 0
IfFlag 0 196 4 -1
GetDlgItem 30 219 1855
SerCtlColors 152 0 0
GetDlgItem 30 219 1860
SerCtlColors 152 0 0
Goto 198
GetDlgItem 30 219 1855
SerCtlColors 152 0 0
StrCpy $[35] "1"
Call 363
File $PLUGINSDIR\InstallOptions.dll
UpdateSatusText  8
RegisterDLL $PLUGINSDIR\InstallOptions.dll show 0
Pop $[30]
StrCpy $[35] ""
GetFunctionAddress 0 0
GetDlgItem 30 143 147
ShowWindow 152 183
GetDlgItem 30 143 158
ShowWindow 152 183
GetDlgItem 30 143 163
ShowWindow 152 183
GetDlgItem 30 143 168
ShowWindow 152 183
GetDlgItem 30 143 173
ShowWindow 152 183
GetDlgItem 30 143 178
ShowWindow 152 156
GetFunctionAddress 1 0
Return
IfFlag 0 226 4 -1
ReadINIStr 30 1773 1824 59
StrCmp  "$[30]" "1" 0 225 0
Reboot
Quit
Return
ReadINIStr 30 1773 1824 59
StrCmp  "$[30]" "1" 0 230 0
StrCpy $[30] ""$INSTDIR\PhotoFiltre.exe""
Execute 152 0 0
Return
Call 363
UpdateSatusText  8
File $PLUGINSDIR\ioSpecial.ini
WriteINIStr 38 1887 -49 59
File $PLUGINSDIR\modern-wizard.bmp
WriteINIStr 1913 87 1891 59
GetDlgItem 30 143 168
CreateFont 31 -40 -64 231 0
SendMessage -1 152 239 235 156 0
SerCtlColors 152 0 0
GetDlgItem 30 143 173
SerCtlColors 152 0 0
GetDlgItem 30 143 1921
SerCtlColors 152 0 0
GetDlgItem 30 143 1926
SerCtlColors 152 0 0
GetDlgItem 30 143 147
SerCtlColors 152 24 0
GetDlgItem 30 143 158
SerCtlColors 152 24 0
SendMessage -1 152 1633 156 1931 2
Return
MessageBox 52 -65 6 255 0
Abort
Return
SetOutPath $INSTDIR
File License.txt
File TranslationEN.plg
File PhotoFiltre.exe
File PhotoFiltre.htm
File PhotoMasque.htm
StrCpy $_OUTDIR "$OUTDIR"
SetOutPath $_OUTDIR\Selections
File Arrow01.pfs
File Arrow02.pfs
File Arrow03.pfs
File Balloon01.pfs
File Balloon02.pfs
File Cross.pfs
File Hexagon.pfs
File RightAngledTriangle.pfs
File Star01.pfs
File Star02.pfs
SetOutPath $_OUTDIR
StrCpy $_OUTDIR "$OUTDIR"
SetOutPath $_OUTDIR\Plugins
File Read-me.txt
SetOutPath $_OUTDIR
StrCpy $_OUTDIR "$OUTDIR"
SetOutPath $_OUTDIR\Masks
File Brush.gif
File Bubbles.gif
File Camera.gif
File Chaos.gif
File Diffuse.gif
File Dilution.gif
File Ellipse.gif
File Flame.gif
File Fog.gif
File Ink.gif
File Keyhole.gif
File Lines.gif
File Pastels.gif
File Slide.gif
File Snowflake.gif
File Sponge.gif
File Spray.gif
File Star.gif
File Sun.gif
File Torn.gif
File Twirl.gif
File Watercolor.gif
File Wet.gif
SetOutPath $_OUTDIR
StrCpy $_OUTDIR "$OUTDIR"
SetOutPath $_OUTDIR\Patterns
File Canvas01.jpg
File Canvas02.jpg
File Canvas03.jpg
File Color01.jpg
File Color02.jpg
File Color03.jpg
File Fabric01.jpg
File Fabric02.jpg
File Fabric03.jpg
File Marble01.jpg
File Marble02.jpg
File Marble03.jpg
File Metal01.jpg
File Metal02.jpg
File Metal03.jpg
File Nature01.jpg
File Nature02.jpg
File Nature03.jpg
File Paper01.jpg
File Paper02.jpg
File Paper03.jpg
File Sandstone01.jpg
File Sandstone02.jpg
File Sandstone03.jpg
File Scanlines01.gif
File Scanlines02.gif
File Scanlines03.gif
File Wall01.jpg
File Wall02.jpg
File Wall03.jpg
File Wood01.jpg
File Wood02.jpg
File Wood03.jpg
SetOutPath $_OUTDIR
WriteReg 2147483650 17 0 1944 1
WriteReg 2147483650 2898 2962 5 1
WriteReg 2147483650 2898 2974 2990 1
WriteUninstaller Uninst.exe 3663241 2228
StrCpy $[30] "$[33]" 1
StrCmp  "$[30]" ">" 362 0 0
StrCmp  "$[33]" "" 0 353 0
ReadRegStr 30 2147483650 1653 1674 0
StrCmp  "$[30]" "" 352 0 0
StrCpy $[33] "$[30]"
Goto 353
StrCpy $[33] ""
SetFlag 1 183
SetOutPath $COMMONFILES\$[33]
CreateShortCut  "$COMMONFILES\$[33]\PhotoFiltre.lnk "  "$INSTDIR\PhotoFiltre.exe " 0 0 0
CreateShortCut  "$COMMONFILES\$[33]\PhotoFiltre Information.lnk "  "$INSTDIR\PhotoFiltre.htm " 0 0 0
CreateShortCut  "$COMMONFILES\$[33]\PhotoMasque Information.lnk "  "$INSTDIR\PhotoMasque.htm " 0 0 0
CreateShortCut  "$COMMONFILES\$[33]\Uninstall PhotoFiltre.lnk "  "$INSTDIR\Uninst.exe " 0 0 0
SetFlag 1 156
CreateShortCut  "$COMMON_DESKTOPDIRECTORY\PhotoFiltre.lnk "  "$INSTDIR\PhotoFiltre.exe " 0 0 0
WriteReg 2147483650 1653 1674 1649 1
Return
UpdateSatusText  16
StrCmp  "$PLUGINSDIR" "" 0 373 0
Push $0
SetFlag 2 0
GetTempFileName  $TEMP
Delete $0
SetOutPath $0
IfFlag 374 0 2 0
StrCpy $PLUGINSDIR "$0"
Pop $0
Return
MessageBox 1048592 3265 0 0 0
Quit
Return
 

alex54007

Grünschnabel
Hallo,

ich habe ein anderes Problem mit dem NSIS Uninstaller, die Installationsroutine funktioniert wunderbar, wenn ich allerdings meinen Uninstaller starte, werden die Ordner des Programms gelöscht, aber der Ordner im Startmenü wird nicht gelöscht.

Hier ein Teil des Codes für den Uninstaller:


Section Uninstall
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP

Delete "$DESKTOP\QUNDIS Kc-Werte Datenbank.lnk"
RMDir /r "$SMPROGRAMS\$ICONS_GROUP"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"

RMDir /r $INSTDIR
RMDir /r "$DATADIR\*.*"

SetAutoClose false
SectionEnd

Kann mir jemand helfen?
Danke schon mal für die Hilfe.