Skip to content
⌘ NSIS Forum Archive

Can't initialize plugins directory windows 10/1903

8 posts

mrjohn#edited

Can't initialize plugins directory windows 10/1903

Hi
After updating my system to Windows 10 1903 I got this message on installers created with NISIS:

Can't initialize plugins directory.Please try again later

also could be a problem generated by Avast antivirus
thanks
mrjohn#
Hi,exact message:

---------------------------
Install NET SFE
---------------------------
Error! Can't initialize plug-ins directory. Please try again later.
---------------------------
OK
---------------------------



seems to me the Avast is the problem,disabling it seems to work
Anders#
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

!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 
mrjohn#
Hi
found the problem:disabling Avast Cybercapture option fix the problem,seems that it opens the installer twice:first,for one second in a 'sandbox'...