Archive: RegDLL and .OLB


RegDLL and .OLB
Thx guys! :D my Setup is running fine, the only thing I have to do now is to get NSIS to register 3 .OLB Files (MSACC9.OLB, MSWORD8.OLB and MSWORD9.OLB) and I don't know how to - anyway I don't know how to register them without NSIS :rolleyes: I hope anybody knows how to realize that

so long -L-B-


Hi,
You have two options:
1. Use Regtlib.exe EXCEL9.OLB
2. Use a system call msdn

For the former option see attached file,
for the latter, perhaps someone more experianced with system.dll plugin can help.


Regtlib is not include with all Windows versions. Using API calls is a better idea.

I'm also looking for a good way to register type libaries for VB run-time installation etc.


Regtlib
I'll try it with the regtlib, I'll just install it into the $WINDIR with my setup and then call it. One more question:

Can anyone give me a more detailed sample of using Exec and ExecShell? The only Examples I found where bigtest.nsi and viewhtml.nsi, and there is no example of using parameters

thanks in advance

-L-B-


Joost hello,
Regtlib is not included with ANY version of windows.
It is included in Visual Studio service pack 3 +.


No matter
No matter, 'cause you can include it in all of your setups - you just have to know how you use it with NSIS, thats what my problem is :D

Well - if it's as easy as I think, I have just to call it like this:

SearchPath $6 REGTLIB.EXE
Exec '"$6"'
ExecShell "" '"$INSTDIR"' "$SYSDIR\MSACC9.OLB"

Is this right?

Unfortunately I don't know how to check if they have been registered, any idea?

so long -L-B-


Not quite :D
You use

ExecWait '$SYSDIR\regtlib.exe "D:\path to file\file to register"'
- or -
ExecWait '"$PLUGINSDIR\regtlib.exe" "D:\path to file\file to register"'

Use Regtlib.exe -? for command line parameters.
Ofcourse :D you have to preceed it with a File command for Regtlib.exe .

Hmm
Ok, this works...but...
If regtlib fails, I dont receive an error...


Look it up in the docs: :confused:

ExecWait '"$PLUGINSDIR\regtlib.exe" "D:\path to file\file to register"' $R0
Now $R0 has exit code!

Nope
Unfortunately it doesn't work
but I solved it with

ExecWait '$SYSDIR\USregOLB.BAT'

So the User can see if there is an error.

I know it's not the best way...but it works and for now it's an acceptable solution I think

nevertheless thanks you all!

-L-B-


Attached is a BAT file. As you can see it reports the error, so $R0 whould hold an error code!!