Old 19th June 2019, 07:10   #1
mrjohn
Member
 
Join Date: Feb 2009
Posts: 66
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

Last edited by mrjohn; 19th June 2019 at 08:39.
mrjohn is offline   Reply With Quote
Old 19th June 2019, 09:10   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,106
What is the exact message? Press Ctrl+C in the dialog...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 19th June 2019, 14:55   #3
mrjohn
Member
 
Join Date: Feb 2009
Posts: 66
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
mrjohn is offline   Reply With Quote
Old 19th June 2019, 16:46   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,106
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
Old 20th June 2019, 09:48   #5
mrjohn
Member
 
Join Date: Feb 2009
Posts: 66
Hi
tested your code but the same message/error
thanks
mrjohn is offline   Reply With Quote
Old 20th June 2019, 13:24   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,106
And if you change $LocalAppData to $Desktop? Is the AV blocking all folders?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th June 2019, 15:33   #7
mrjohn
Member
 
Join Date: Feb 2009
Posts: 66
same problem with $Desktop
yes that seems to do
mrjohn is offline   Reply With Quote
Old 3rd July 2019, 06:12   #8
mrjohn
Member
 
Join Date: Feb 2009
Posts: 66
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'...
mrjohn is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump