View Single Post
Old 19th June 2019, 16:46   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,163
This happens if CreateDirectory fails for "%Temp%\nsXYZ.tmp" which very much sounds like a security tool that is trying too hard.

You can work around it with something like this

PHP Code:
!include LogicLib.nsh
Function .onInit
CreateDirectory 
"$Temp\3b448375-b854-42b2-a42e-b4c74cac54b8"
${IfNot} ${Errors}
    
RMDir "$Temp\3b448375-b854-42b2-a42e-b4c74cac54b8"
${Else}
    ${ForEach} $
0 0 9999 1
        ClearErrors
        CreateDirectory 
"$LocalAppData\ns$0.tmp"
        
${IfNotThen} ${Errors} ${|} ${Break} ${|}
    ${
Next}
    
UnsafeStrCpy $PluginsDir "$LocalAppData\ns$0.tmp"
${EndIf}
InitPluginsDir
FunctionEnd 

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote