Archive: Printer Driver / Port


Printer Driver / Port
Hi all,

has anybody some information about installing a printer driver and printer port using NSIS.

I think that I need to write a plugin, or can I use the System Plugin to do this stuff ?

Any suggestions/ideas are welcome

Romain


If you have an INF file for the driver you can install the driver using the INF. See this thread for more information about installing INF files.


Thanks kichik !

Initially, I wanted to copy the DLL's and create the printer object using API calls :o

Now, I wrote myself an INF file to create a Postscript printer using a customized PPD file. This INF file will now be called in NSIS to create the printer object.... much better and easier.

Romain


OK, adding a printer for an EXISTING port works fine, but I now need to add a new printer port. The problem is that this cannot be done using INF files :(

The only solution for this problem is using native Win32 API calls. So here's my question:

How can I add a port monitor (AddPort Win32API function) using the System plugin ?

BOOL
(WINAPI *pfnAddPort)(
HANDLE hMonitor //MONITOR2 only
LPWSTR pName,
HWND hWnd,
LPWSTR pMonitorName
);

Many thanks for your help


AddPort on MSDN doesn't take the same parameters that you've specified. Are you sure that's the one?

Anyway, once you find the right function you can use the System plug-in to call it. There are tons of examples in the Archive, the forums and some in Contrib\System.


Anyway, once you find the right function you can use the System plug-in to call it. There are tons of examples in the Archive, the forums and some in Contrib\System. [/B]
Oops, I always forget to look at the archive .... there are indeed tons of samples.

Will take a look there ... Thanks !

it pardons my lack of experience with NSIS, but not found Contrib\System and an example of the use of the API AddPort.

can help me?


Currently "Contrib\System" is "Examples\System" under your local NSIS installation.

Also, system plugin examples at archive,
http://nsis.sourceforge.net/Category...lugin_Examples

Also, you may search the forum for system plugin code examples.
As mentioned above once you find the right function you can call it with system plugin.