Old 27th November 2009, 17:07   #1
pssns
Junior Member
 
Join Date: Nov 2009
Posts: 3
InstallLib does not register any dll or ocx

New to NSIS. My first project is for trying to convert an old VB6 setup to NSIS, and testing it in Windows 7. To make things easier, I am testing with UAC disabled.

When installing, it installs all the normal files, links and uninstall program, but it does not install any of the dlls and ocx.

I am testing it with the logging version of the installer, and in the install.log file does not apear any comment or error about the dlls and ocx.

Sure it will be something forgotten, so, any help will be appreciated.

Here is a partial code of what I am using

; MUI end ------

!include "Library.nsh"

Var ALREADY_INSTALLED
Var Version

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "ProtonSetup.exe"
InstallDir "C:\PROTON"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

RequestExecutionLevel admin

Section "ProtonInstall"
LogSet on
ReadRegDWord $Version HKLM "${PRODUCT_DIR_REGKEY}" Version
IfErrors new_installation
StrCpy $ALREADY_INSTALLED 1
new_installation:
SetOverwrite ifnewer
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\dbgrid32.ocx" "$SysDir\dbgrid32.ocx" "$SysDir"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\ADODCES.DLL" "$SysDir\ADODCES.DLL" "$SysDir"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\STDFTES.DLL" "$SysDir\STDFTES.DLL" "$SysDir"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\MSSTDFMT.DLL" "$SysDir\MSSTDFMT.DLL" "$SysDir"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\MSADODC.OCX" "$SysDir\MSADODC.OCX" "$SysDir"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\MSMPIES.DLL" "$SysDir\MSMPIES.DLL" "$SysDir"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\MSMAPI32.OCX" "$SysDir\MSMAPI32.OCX" "$SysDir"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "Support\FLXGDES.DLL" "$SysDir\FLXGDES.DLL" "$SysDir"
pssns is offline   Reply With Quote
Old 27th November 2009, 21:03   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Perhaps you're not running the installer as admin. When UAC is disabled, windows ignores the requested execution level. To work around this, use the userinfo plugin to manually test for actual admin access in .onInit.
MSG is offline   Reply With Quote
Old 28th November 2009, 17:27   #3
pssns
Junior Member
 
Join Date: Nov 2009
Posts: 3
It was easier than supposed. I tested in an XP machine, and it happened the same, so, after investigating, I added SetOutPath before registering dlls in the SysDir and InstDir folders, and now it works.
pssns is offline   Reply With Quote
Old 1st December 2009, 06:23   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
SetOutPath sets the working directory which is also used in the search path for dependencies. If you have dependencies outside of the system folder and the search path, you have to set the working folder to that.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 1st December 2009, 07:08   #5
pssns
Junior Member
 
Join Date: Nov 2009
Posts: 3
Thanks for your interest kichik.

The sample script inserted does not completely illustrate the situation because are only some partial lines of about 100 files to copy, and the ocx and dlls that did not copied where those in the InstDir folder, those in SysDir copied correctly.

After using the log version of the installer, I saw that SetOutPat $InstDir also creates the folder if it does not exists, so putting it at the beginning of the files to copy to $InstDir solved my problem.
pssns 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