Skip to content
⌘ NSIS Forum Archive

NSIS custom initpluginsdir help

2 posts

Coby#

NSIS custom initpluginsdir help

When I use a custom temporary $PLUGINSDIR in NSIS, the system.dll plugin is not displayed in this folder
What's wrong here?

Example:

Name "Basic"
OutFile "Basic.exe"
InstallDir "$TEMP"
!include "MUI.nsh"
RequestExecutionLevel User
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
  
Function .onInit
  ClearErrors
  CreateDirectory $EXEDIR\PluginsDir
  IfErrors 0 +3
  ClearErrors
  InitPluginsDir
  StrCpy $0 $EXEDIR\PluginsDir
  SetOutPath $0
  File /r /x thumbs.db "${NSISDIR}\Plugins\chngvrbl.dll"
  Push $0
  Push 26
  CallInstDLL $0\chngvrbl.dll changeVariable
FunctionEnd
Section ""
  SetAutoClose True
SectionEnd
Function .OnGuiEnd
  RMDir /r "$PLUGINSDIR"
  SetOutPath $EXEDIR
FunctionEnd 
Anders#
You are not initializing $pluginsdir to something special so how is the system plug-in supposed to know?

Function .onInit
UnsafeStrCpy $pluginsdir "$localappdata\mytemp" ; NSIS 3
CreateDirectory $pluginsdir
; Use plug-ins here...
FunctionEnd
This thread is a duplicate of http://forums.winamp.com/showthread.php?p=3053503 and http://forums.winamp.com/showthread.php?t=357534 , try searching first next time!