1 |
|
---|
2 | This directory holds sources for a Win32 test utility to test the "spoolss"
|
---|
3 | (print spool subsystem) functions of either a Windows or a Samba server. The
|
---|
4 | sources are known to build with (free as in beer) Microsoft Visual C++ 2008
|
---|
5 | Express Edition's "nmake.exe" on Windows XP Professional.
|
---|
6 |
|
---|
7 |
|
---|
8 | How to build
|
---|
9 | ------------
|
---|
10 |
|
---|
11 | Use the Microsoft "nmake" command to build the *.exe. This command is in your
|
---|
12 | %path% if you start the "Visual Studio 2008 Command Prompt" from your Start
|
---|
13 | menu.
|
---|
14 |
|
---|
15 | Currently the real build target is named "testspoolss.exe". Run
|
---|
16 |
|
---|
17 | nmake /f Makefile
|
---|
18 |
|
---|
19 | to build the testspoolss.exe. After a successfull build you may want to clean up
|
---|
20 | temporary files:
|
---|
21 |
|
---|
22 | nmake /f Makefile cleantmp
|
---|
23 |
|
---|
24 |
|
---|
25 | How to use
|
---|
26 | ----------
|
---|
27 |
|
---|
28 | Running testspoolss.exe with no additional params displays a short usage info.
|
---|
29 |
|
---|
30 | ..............................................................................
|
---|
31 | usage: testspoolss.exe <name> [print] [samba3] [architecture=ARCHITECTURE]
|
---|
32 |
|
---|
33 | <name> can be a server or printer name URI
|
---|
34 | [print] will print all data that has been retrieved
|
---|
35 | from the printserver
|
---|
36 | [samba3] will skip some tests samba servers are known
|
---|
37 | not to have implemented
|
---|
38 | [architecture=X] allows to define a specific
|
---|
39 | architecture to test with. choose between:
|
---|
40 | "Windows NT x86" or "Windows x64"
|
---|
41 | ..............................................................................
|
---|
42 |
|
---|
43 | The utility may be most useful if you use the "print" parameter to output all
|
---|
44 | data received from the print server. You may re-direct the data into log files
|
---|
45 | for later evaluation like this:
|
---|
46 |
|
---|
47 | testspoolss.exe \\smbserver print samba3 1>smbserver.log 2>smbserver.err
|
---|
48 | testspoolss.exe \\smbserver print 1>smbserver.log 2>smbserver.err
|
---|
49 | testspoolss.exe \\winserver print 1>winserver.log 2>winserver.err
|
---|
50 |
|
---|
51 | One interesting source of learning could be to compare the output for (maybe
|
---|
52 | "the same") printers/drivers as installed on a Windows and on a Samba print
|
---|
53 | server:
|
---|
54 |
|
---|
55 | testspoolss.exe \\winserver\printername print 1>winprinter.log 2>winprinter.err
|
---|
56 | testspoolss.exe \\smbserver\printername print 1>smbprinter.log 2>smbprinter.err
|
---|
57 |
|
---|
58 | and then compare the respective log files with a diff utility of your choice.
|
---|
59 | To install "the same" printer/driver on a Samba server as on a Windows server,
|
---|
60 | you can use the Samba "net" utility, which has the following syntax:
|
---|
61 |
|
---|
62 | net rpc printer MIGRATE PRINTERS printername \
|
---|
63 | --server=winserver \
|
---|
64 | --destination=smbserver \
|
---|
65 | -UAdministrator%secretpassword
|
---|