|
|
#1 |
|
Junior Member
|
DirState problem
i want to determin whether a directory is empty or not.
i am using DirState ============= part of code ============================= !include LogicLib.nsh !include FileFunc.nsh !insertmacro DirState Var Is_Empty Section Uninstall ${DirState} "$SMPROGRAMS\FQR\" $Is_Empty ${If} $Is_Empty == 0 Delete "$SMPROGRAMS\FQR\" ${EndIf} SectionEnd ===================================================== the compiler is giving me the following error:- !insertmacro: DirStateCall Call must be used with function names starting with "un." in the uninstall section. Usage: Call function_name | [:label_name] Error in macro DirStateCall on macroline 4 Error in script "D:\MSL\GM Debug\GM_Debug.nsi" on line 2304 -- aborting creation process ====================================================== any help is highly appreciated. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
|
!insertmacro un.DirState
${un.DirState} ... IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
|
thanks brother.
so the corrected code is:- ============= part of code ============================= !include LogicLib.nsh !include FileFunc.nsh !insertmacro un.DirState Var Is_Empty Section Uninstall ${un.DirState} "$SMPROGRAMS\FQR\" $Is_Empty ${If} $Is_Empty == 0 Delete "$SMPROGRAMS\FQR\" ${EndIf} SectionEnd ===================================================== |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|