Archive: PWD registering vs. NSIS registering


PWD registering vs. NSIS registering
First of all i'm french... so don't be to scared when reading me.

I'm trying to translate PDW setup file (that's the VB deployment tool output file) code lines into NSIS code. Here is what i'm after:

File2=@COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5/31/98 11:00:00 PM,22288,4.71.1460.1

According to Micosoft MSDN, DllSelfRegister means

self registering file containing DllRegisterServer and UnregServer functions...
. The macro
WinSysPathSysFile
installs files to the system subdirectory, but the file is installed as a shared component (MS source http://support.microsoft.com/default...NoWebContent=1 ).

I just want to know what this actually does. Does it copy the dll file in the system directory and then register it again, or does it only increment the reference count?

The same question for the following line of code gained from Setup.lst:

File14=@COMCT332.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),6/23/98 11:00:00 PM,369696,6.0.0.8169

$(shared) indicates if the file is a shared system file and will be registered as such in the system registry... so why do they not use directly the WinSysPathSysFile macro instead since this could do the same job?

Thanks

To replace a DLL if newer and register it, use UpgradeDLL. In 2.0b4 it's in Inlcude\UpgradeDLL.nsh so you can simply add !include UpgradeDLL.nsh to make it available in your script. For usage instructions see the appendix in the documentation where UpgradeDLL is described.

To increase or decrease the count of a shared DLL you can use the available functions in the same appendix.

There is a complete example that installs VB6 runtime files which uses both of those. It is in the appendix C.

You can also try this automated PDW to NSIS tool:

http://nsis.sourceforge.net/archive/...php?pageid=162


Precisely.... the web link you indicate, seems to be broken now...

Also i'm searching for how to translate properly what PWD is doing cause' i already know how to register a dll and add a reference to it using NSIS script... The related ducumentation is good enough and very helpful.


UpgradeDLL does the same as DLLSelfRegister and the other two functions do what it does for shared DLL/OCX. Translating is simply using those.

The link works fine for me now, try again. SourceForge MySQL serer sometimes lags a bit.