Old 18th August 2008, 21:15   #1
zanz
Member
 
Join Date: Jul 2008
Posts: 59
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!
zanz is offline   Reply With Quote
Old 19th August 2008, 05:13   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

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 19th August 2008, 17:56   #3
zanz
Member
 
Join Date: Jul 2008
Posts: 59
Got it, thanks Kichik.
zanz is offline   Reply With Quote
Old 20th August 2008, 20:46   #4
zanz
Member
 
Join Date: Jul 2008
Posts: 59
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.
zanz is offline   Reply With Quote
Old 20th August 2008, 22:17   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Which NSIS version?

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 20th August 2008, 22:25   #6
zanz
Member
 
Join Date: Jul 2008
Posts: 59
It's version 2.38, I don't want to jump to conclusion, but could it be a bug in NSIS?
zanz is offline   Reply With Quote
Old 20th August 2008, 22:27   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Attach a short example script. I'll check later.

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 20th August 2008, 22:54   #8
zanz
Member
 
Join Date: Jul 2008
Posts: 59
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
zanz is offline   Reply With Quote
Old 21st August 2008, 12:55   #9
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Why are you using $INSTDIR as temporary folder?
Joost Verburg is offline   Reply With Quote
Old 21st August 2008, 21:40   #10
zanz
Member
 
Join Date: Jul 2008
Posts: 59
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!
zanz 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