View Single Post
Old 3rd September 2008, 20:32   #19
rbchasetfb
Junior Member
 
rbchasetfb's Avatar
 
Join Date: Sep 2008
Posts: 15
Love the CLRLoader...did just what I needed. However, is there a trick to get the CLRLoader.dll to delete from the $PLUGINSDIR when the NSIS Setup ends. All the other DLLs and files delete okay, including the one that CLRLoader calls, just the CLRLoader.dll is left behind. Here's the code snipet:

PHP Code:
SetPluginUnload  alwaysoff

Function loadDll
    InitPluginsDir
    SetOutPath $PLUGINSDIR
    File 
"${NSISDIR}\\Plugins\\CLRLoader.dll"
    
File "ITMInstaller.dll"
    
StrCpy $${NSIS_MAX_STRLEN}
    
System::Call 'CLRLoader::Call(w "ITMInstaller::NSIS::ITMInstaller::GetDomain()") w. r0' u
    MessageBox MB_OK
|MB_ICONINFORMATION  " $0"
    
SetPluginUnload manual
    System
::Free $0
    Delete 
"$PLUGINSDIR\\CLRLoader.dll"
FunctionEnd

Section 
"MainSection" SEC01
  Call loadDll
SectionEnd 
Thanks in Advance for the help.
rbchasetfb is offline   Reply With Quote