zanz
18th August 2008 22:15 UTC
What is this NSIS.Library.RegTool file?
I'm developing a few new installers, and I noticed that in the InstallDir, there's this file generated by NSIS installer:
NSIS.Library.RegTool.v2.{Some GUID}.exe.
At first I thought may be if i reboot my machine, this file will go away (this particular installer requires a reboot each time user installs the product).
Even after a reboot this file remains in the InstallDir. What's the function of this file? Is it safe to use? I tried searching for this file online, but didn't find much help. Thanks!
kichik
19th August 2008 06:13 UTC
It's a tool used to register DLL files after they have been replaced at reboot. It deletes itself after two reboots. One for the actual replacement and one for deleting itself.
zanz
19th August 2008 18:56 UTC
Got it, thanks Kichik.
zanz
20th August 2008 21:46 UTC
I noticed that if I do not reboot, but uninstall the product. Next time when the machine is rebooted, Windows throws an error that "Cannot find NSIS.Library.RegTool.v2.{GUID}.exe. Make sure you typed the name correctly, and then try again.
How can this error be prevented on a reboot? any help will be appreciated.
kichik
20th August 2008 23:17 UTC
Which NSIS version?
zanz
20th August 2008 23:25 UTC
It's version 2.38, I don't want to jump to conclusion, but could it be a bug in NSIS?
kichik
20th August 2008 23:27 UTC
Attach a short example script. I'll check later.
zanz
20th August 2008 23:54 UTC
I'm not exactly sure which part of script you'd want to see but here's how the install section starts:
Section
SetRebootFlag true ; I want user to reboot the machine each time the product is installed.
.
.
.
;Install to InstallDir
File ${SOURCE_DIR}\myDLL1.dll
File ${SOURCE_DIR}\myDLL2.dll
File ${SOURCE_DIR}\${_LANG}\myFile.txt
!insertmacro InstallOnReboot ${SOURCE_DIR}\MyDLL3.dll $INSTDIR\MyDLL3.dll
!insertmacro InstallOnReboot ${SOURCE_DIR}\MyDLL4.dll $INSTDIR\MyDLL4.dll
.
.
.
!insertmacro InstallLib REGDLL SHARED REBOOT_NOTPROTECTED "${SOURCE_DIR}\myDLL3.dll" "$INSTDIR\myDLL3.dll" "$INSTDIR"
!insertmacro InstallLib REGDLL SHARED REBOOT_NOTPROTECTED "${SOURCE_DIR}\myDLL4.dll" "$INSTDIR\myDLL4.dll" "$INSTDIR"
;Install service
;Create registry keys/entries
the install section ends there. On uninstall, I just use UnRegDLL to unregister these DLLs except one of my DLLs where I use UnInstallLib to unregister a shared DLL
Joost Verburg
21st August 2008 13:55 UTC
Why are you using $INSTDIR as temporary folder?
zanz
21st August 2008 22:40 UTC
aww, I wasn't too clear after reading the documentation. Changing to TEMP folder instead of INSTDIR resolved the problem. I thought I had to use the INSTDIR (after reading the docs).
Thanks so much Joost and kichik for your prompt help!