- NSIS Discussion
- ini registration log file
Archive: ini registration log file
LazyBear
7th January 2004 09:03 UTC
ini registration log file
Yeah I'm still learning after whole nights in front of my PC the Setup works as I want it to do :D
well, now I have another (stupid) question - it's not so important but I think it will increase the usability (does Somebody except me know this designation?)
I have to register a few DLL and OCX Files (now about 20 maybe more somtimes later) using
Exec "$\"$SYSDIR\regsvr32.exe$\" $\"$SYSDIR\various.ocx$\""
I get a message box for each file - well thats to which this function is there. I think it would be great to get a log file instead, maybe a .txt file shown at the end of the Installer, which shows all registered DLLs/OCX... and all errors during the registration
I don't know if there is a function for this yet...
unfortunately I don't know how to realize a function like this, too...
any ideas? :confused:
so long -L-B-
zarged
7th January 2004 09:20 UTC
Use UpgradDLL to install/upgrade dll's and ocx's, you can find it in the nsis\include directory. It doesn't have a log function, that I'm aware of, and I'm not sure how easy it would be to implement - maybe someone else could help further there.
LazyBear
7th January 2004 09:39 UTC
Use UpgradDLL to install/upgrade dll's and ocx's, you can find it in the nsis\include directory.
I can't see any matter to use this... im glad with using the regsvr32.exe... :o
I'm just searching for something like a log function as described above
nevertheless thanks :D
kichik
7th January 2004 10:47 UTC
UpgradDLL only copies the DLL/OCX if it's newer than what the user has, and if it's in use it copies it after reboot. In the process, it also registers it using the RegDLL command which is what you should use. If for some reason you are set on regsvr32.exe and don't want to use RegDLL, you can use the /S switch for regsvr32.exe to avoid the message.
RegDLL shows a message in the log if it fails, but not if it succeeds. If you want to show a message anyway you can use:
ClearErrors
RegDLL "$SYSDIR\blabla.dll"
IfErrors 0 +2
DetailPrint 'error registering "$SYSDIR\blabla.dll"'
LazyBear
7th January 2004 12:13 UTC
hmm
thx kichik!
where can I find the usage of UpgradeDLL?
so if I upgrade the DLLs and use
ClearErrors
RegDLL "$SYSDIR\blabla.dll"
IfErrors 0 +2
DetailPrint 'error registering "$SYSDIR\blabla.dll"'
does the reg succeed or fail? I'm sorry for this question but I never mentioned questions about these things before
ok, the second: is there a way to copy the details from the log window into a text file?
thx in advance
-L-B-
kichik
7th January 2004 12:18 UTC
Right click and choose copy. There is also a script written by Afrow UK in the Archive that does this from the script itself.
LazyBear
7th January 2004 12:54 UTC
Well I've tried
More advanced dump log to file
but all I got was an empty txt file
:(
Afrow UK
7th January 2004 18:09 UTC
Make sure you call the function properly.
I will have a look at the script for you, incase it's naff!
-Stu
Afrow UK
7th January 2004 18:14 UTC
Well for what you want, you should use this similar function by Kichik:
http://nsis.sourceforge.net/archive/...instances=0,11
My function only copies lines from the log window that contain a specified string (the example on the archive shows that any lines containing "error" will be copied to the file).
-Stu