View Single Post
Old 20th April 2018, 12:35   #1
Coby
Junior Member
 
Join Date: Feb 2016
Posts: 48
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:

PHP Code:
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 
//x thumbs.db "${NSISDIR}\Plugins\chngvrbl.dll"
  
Push $0
  Push 26
  CallInstDLL 
$0\chngvrbl.dll changeVariable
FunctionEnd

Section 
""
  
SetAutoClose True
SectionEnd

Function .OnGuiEnd
  RMDir 
/"$PLUGINSDIR"
  
SetOutPath $EXEDIR
FunctionEnd 
Coby is offline   Reply With Quote