Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   What is this NSIS.Library.RegTool file? (http://forums.winamp.com/showthread.php?t=296139)

zanz 18th August 2008 21:15

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 05:13

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 17:56

Got it, thanks Kichik.

zanz 20th August 2008 20:46

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 22:17

Which NSIS version?

zanz 20th August 2008 22:25

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 22:27

Attach a short example script. I'll check later.

zanz 20th August 2008 22:54

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 12:55

Why are you using $INSTDIR as temporary folder?

zanz 21st August 2008 21:40

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!


All times are GMT. The time now is 17:59.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.