rpetges
7th October 2003 20:25 UTC
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
kichik
8th October 2003 10:02 UTC
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.
rpetges
8th October 2003 20:58 UTC
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
rpetges
12th October 2003 09:52 UTC
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
kichik
12th October 2003 12:04 UTC
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.
rpetges
12th October 2003 13:04 UTC
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 !
mpenaili
10th April 2007 16:31 UTC
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?
Red Wine
10th April 2007 17:05 UTC
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.