Customizing the Installation
Developers and power users, you can make Zan Image Printer your own! Zan Image Printer provides an installation configuration file (setup.ini) to control the installation. With this configuration file, you can perform a silent mode installation, install multiple printers, define a company URL, set the supported DPI resolutions and paper sizes, determine whether or not all users share the same settings, and so on.

Both the install and uninstall programs support the -silent switch to run automatically without user interaction.
To install Zan Image Printer silently run:
zvprt5_setup -silent

To uninstall Zan Image Printer silently run:
uninstall --p "printername"
Example: uninstall --p "Zan Image Printer (BW)"

To uninstall all Zan Image Printers silently run:
uninstall -silent

All of the Zan Image Printer installer files (including zvprt5_setup.exe, setup.ini, zvprt5.sed, and uninstall.exe) are stored within the self-extracting Microsoft CAB file zvprt5.exe. Use WinZip or WinRAR to extract the files.

You can customize the defaults by editing setup.ini with a text editor:
[setup]
homepage = http://www.zan1011.com/
showstatusdialog = 1
showaskdialog = 0
showconfigdialog = 1
showfinishdialog = 0
product = Zan Image Printer
defaultprinter = 
installdir =
uninstallreg = 1
x86driver = 2
allusersfolderpolicy = 1
overwriteinifiles = 0
custompaper_1 = my custom paper 1, 12.5x13.8
custompaper_2 = my custom paper 2, 6 mm x 8 mm
custompaper_3 = my custom paper 3, 6" x 11"
custompaper_4 = my custom paper 4, 2.5 cm x 3.6 cm


[printer_1]
install = 1
printername = Zan Image Printer (BW)
location=http://www.zan1011.com/
comment=
dpi = default
defaultdpi = 300
paper=default
defaultpaper=Letter
color=default
defaultcolor=bw
orientation=default
defaultorientation=
allusers = 1
autostart = 0
copyinifiles_1=save.ini, image_bw.ini, general.ini
copyinifiles_2=app.ini, advimage.ini, text.ini
copyinifiles_3=docuname.ini, paper.ini, histdb_docuname.ini
copyinifiles_4=event.ini, message.ini, watermark.ini, ftp.ini
copyinifiles_5=email.ini,printerredirection.ini,sentineltemplate.txt
copyinifiles_6=histdb_emailserver.ini,orientation.ini,histdb_ftpusername.ini

[printer_2]
install = 1
printername = Zan Image Printer (Color)
location=http://www.zan1011.com/
comment=
dpi = default
defaultdpi =200x200
paper=default
defaultpaper=Letter
color=default
defaultcolor=color
orientation=default
defaultorientation=
allusers = 1
autostart = 0
copyinifiles_1=save.ini, image_color.ini, general.ini
copyinifiles_2=app.ini, advimage.ini, text.ini
copyinifiles_3=docuname.ini, paper.ini, histdb_docuname.ini
copyinifiles_4=event.ini, message.ini, watermark.ini, ftp.ini
copyinifiles_5=email.ini, printerredirection.ini,sentineltemplate.txt
copyinifiles_6=histdb_emailserver.ini,orientation.ini

[printer_3]
install = 0
printername = Zan Image Printer (Fax)
location=http://www.zan1011.com/
comment=
dpi = group2
defaultdpi =204x196
paper=Letter, A4
defaultpaper=Letter
color=bw
defaultcolor=bw
orientation=default
defaultorientation=
allusers = 1
autostart = 0
copyinifiles_1=save.ini, image_fax.ini, general.ini
copyinifiles_2=app.ini, advimage.ini, text.ini
copyinifiles_3=docuname.ini, paper.ini, histdb_docuname.ini
copyinifiles_4=event.ini, message.ini, watermark.ini, ftp.ini
copyinifiles_5=email.ini,printerredirection.ini,sentineltemplate.txt
copyinifiles_6=histdb_emailserver.ini,orientation.ini

[printer_16]
install = 1
printername = Fax (200 x 200)
location=http://www.zan1011.com/
comment=
dpi = 200
defaultdpi =
paper=A4,Letter
defaultpaper=A4
color=default
defaultcolor=bw
orientation=default
defaultorientation=
allusers = 1
autostart = 0
copyinifiles_1=save.ini, image_fax.ini, general.ini
copyinifiles_2=app.ini, advimage.ini, text.ini
copyinifiles_3=docuname.ini, paper.ini, histdb_docuname.ini
copyinifiles_4=event.ini, message.ini, watermark.ini, ftp.ini
copyinifiles_5=email.ini,printerredirection.ini,sentineltemplate.txt
copyinifiles_6=histdb_emailserver.ini,orientation.ini


[printer_20]
install = 1
printername = Screen (96 x 96)
location=http://www.zan1011.com/
comment=
dpi = group3
defaultdpi =96
paper=Letter
defaultpaper=
color=default
defaultcolor=bw
orientation=default
defaultorientation=
allusers = 1
autostart = 0
copyinifiles_1=save.ini, image_screen.ini, general.ini
copyinifiles_2=app.ini, advimage.ini, text.ini
copyinifiles_3=docuname.ini, paper.ini, histdb_docuname.ini
copyinifiles_4=event.ini, message.ini, watermark.ini, ftp.ini
copyinifiles_5=email.ini,printerredirection.ini,sentineltemplate.txt
copyinifiles_6=histdb_emailserver.ini,orientation.ini

The setup.ini allows you to install up to 40 printers during each installation.
The AppName (e.g., setup, printer_1, printer_2, printer_16, printer_20) in the setup.ini file specifies the section that contains the keyname. The AppName is enclosed in square bracket pairs ([]).
The valid AppName for a printer is printer_N, where N is a number from 1 to 40. The printer_N AppNames do not need to be consecutive and you can skip numbers (i.e. printer_1, printer_3, printer_5).

Keyname (Keyname is a key under the [setup] or [printer_N] section) Valid Values (if applicable) Description
homepage Your company's website
showstatusdialog 0
1
Whether to display the status dialog during the installation (0 = false, 1 = true)
showaskdialog 0
1
Whether to display the first dialog box that will ask if you wish to continue before the installation starts (0 = false, 1 = true)
showconfigdialog 0
1
Whether to display the setup options dialog (0 = false, 1 = true)
showfinishdialog 0
1
Whether to display the setup finished dialog after installation (0 = false, 1 = true)
uninstallreg 0
1
Whether the Zan Image Printer uninstall entry should be added to the "Add/Remove Programs" section of the Control Panel (0 = false, 1 = true)
x86driver 1: only install the x86 driver on x64 servers (Windows 2003 x64, Windows 2008 x64, etc.)

2: install the x86 driver on all x64 systems (Windows XP x64, Windows 2003 x64, Windows 2008 x64, Windows 7 x64, etc.)

3: do not install the x86 driver on x64 systems (default)
This option (integer) specifies whether to install x86 printer drivers on an x64 workstation or server.

Note:
During the installation process, you will need to have access to the x86 version of the following unidrv files to install the Zan Image Printer x86 driver on an x64 system:
unidrv.dll
unidrv.hlp
unidrvui.dll
unires.dll
stdnames.gpd
The x86 version of the unidrv files are usually located in the folder at %System32Dir%\spool\drivers\w32x86\3\ (C:\WINDOWS\system32\spool\drivers\w32x86\3\, for example).

During the installation process, you will be prompted for a 32-bit installation disc of your operation system to locate the x86 version of the unidrv files. You can simply click the Cancel button if you already have the x86 version of the unidrv files loaded on your x64 system in the folder at %System32Dir%\spool\drivers\w32x86\3\. To copy the unidrv files from an x86 system to your x64 system before installation, do the following:
1. On your x86 system, open the folder C:\WINDOWS\system32\spool\drivers\w32x86\3\ (the source path, where the files are located), note the following unidrv files:
unidrv.dll
unidrv.hlp
unidrvui.dll
unires.dll
stdnames.gpd

2. On your x64 system, open the folder C:\WINDOWS\system32\spool\drivers\w32x86\3\ (the destination path, where the files should be copied to). If the directory does not exist, create a new folder with that path. Use your favorite method for sending files between two Windows computers to copy the unidrv files you selected on the x86 system (see step 1) into the C:\WINDOWS\system32\spool\drivers\w32x86\3\ on your x64 system.
installdir The folder where the Zan Image Printer files will be installed. If the installdir does not contain path separator characters, the setup installs Zan Image Printer to the Program Files\installdir directory. If the installdir contains path separator characters, it is assumed to specify a complete path.

You can use the [%programfilesx86] macro for the installdir, which specifies the Program Files folder directory (without a trailing backslash) for 32-bit applications. The [%programfilesx86] macro evaluates to the Program Files folder directory on a 32-bit (x86) OS and the Program Files (x86) folder on a 64-bit (x64) OS.

Examples (assume the Program Files folder is C:\Program Files):
installdir=[%programfilesx86]\zvprt50: this installs Zan Image Printer to C:\Program Files\zvprt50 on a 32-bit OS and the C:\Program Files (x86)\zvprt50 folder on a 64-bit OS.
installdir=zvprt50: this installs Zan Image Printer to C:\Program Files\zvprt50
installdir=\myproduct\zvprt50: this installs Zan Image Printer to C:\Program Files\myproduct\zvprt50
installdir=\\myserver\zvprt50: this installs Zan Image Printer to \\myserver\zvprt50
custompaper_X, where X stands for a number from 1 to 20 define the custom paper to be created by specifying its name and measurement The custom paper is defined in the following format:
name, width unit x height unit
The unit can be "(inch), mm, or cm. If unit is omitted, inches are assumed. Examples:
custompaper_1=my custom paper 1, 12.5x13.8
custompaper_2=my custom paper 2, 6 mm x 8 mm
custompaper_3=my custom paper 3, 6" x 11"
custompaper_4=my custom paper 4, 2.5 cm x 3.6 cm

Note: You cannot set the custom paper size as the default paper size.
product Your own OEM brand name
allusersfolderpolicy 1
2
3
Specify where the common application data that can be read and written by all users is located (valid when allusers is set to 1 for the printer):
1 (default and suggested): Use CSIDL_COMMON_DOCUMENTS as the location if the operating system is Vista or newer; otherwise, use CSIDL_COMMON_APPDATA.
2: Use SIDL_COMMON_APPDATA as the location.
3: Use CSIDL_COMMON_DOCUMENTS as the location.
overwriteinifiles 0
1
Whether to overwrite the existing INI setting files for the printer (0 = false, 1 = true)
allusers 0
1
Whether or not all users should share the same settings (0 = false, 1 = true)
autostart 0
1
Whether to launch zvprtsrv for this printer when Windows starts (0 = false, 1 = true)
location The printer's location information, if any, will appear in the General tab of the printer's Properties dialog
comment The printer's comment information, if any, will appear in the General tab of the printer's Properties dialog
defaultprinter the default printer name, leave blank if you don't want to change the current default printer Assign a printer as your default
install 0
1
Whether to install this printer (0 = false, 1 = true)
printername Your own OEM printer name. A printer name cannot contain any of the following characters:
\ / : * ? " < > |
dpi You can specify DPI resolution or a list of DPI resolutions separated by commas (,).
default: 50 x 50, 60 x 60, 75 x 75, 100 x 100, 120 x 120, 150 x 150, 200 x 100, 200 x 200, 240 x 240, 300 x 300, 360 x 360, 400 x 400, 600 x 600
group1: 50 x 50, 60 x 60, 75 x 75, 100 x 100, 120 x 120, 150 x 150, 200 x 100, 200 x 200, 240 x 240, 300 x 300, 360 x 360, 400 x 400, 600 x 600, 720 x 720, 1200 x 1200, 2400 x 2400
group2: 204 x 98, 204 x 196
group3: 72 x 72, 96 x 96, 144 x 144, 288 x 144, 288 x 288
group4: 240 x 144, 240 x 288
group5: 240 x 216
group6: 800 x 600, 1200 x 600, 2400 x 600
group7: 203 x 305
group8: 600 x 540
group9: 254 x 254
group10: 250 x 250, 500 x 500
To specify custom DPIs, enter DPI values separated by commas (e.g., 80, 500, 200 x 100).
If the horizontal and vertical resolutions are the same, enter a single number to specify the resolution (e.g., 300 x 300 can be abbreviated to 300).
Configure the supported DPI resolutions
defaultdpi Specify the default DPI resolution
paper Paper size or a list of paper sizes separated by commas (,)
All: all paper sizes
9X11
10X11
10X14
11X17
12X11
15X11
A0
A1
A2
A3
A3_EXTRA
A3_ROTATED
A4
A4_EXTRA
A4_PLUS
A4_ROTATED
A5
A5_EXTRA
A5_ROTATED
A6
A6_ROTATED
B0(ISO)
B0(JIS)
B1(ISO)
B1(JIS)
B2(ISO)
B2(JIS)
B3(ISO)
B3(JIS)
B4
B4(JIS)
B4_JIS_ROTATED
B5(ISO)
B5(JIS)
B5_JIS_ROTATED
B6(ISO)
B6_JIS
B6_JIS_ROTATED
CSHEET
DSHEET
ESHEET
ENV_9
ENV_10
ENV_11
ENV_12
ENV_14
ENV_DL
ENV_C3
ENV_C4
ENV_C5
ENV_C6
ENV_C65
ENV_B4
ENV_B5
ENV_B6
ENV_ITALY
ENV_MONARCH
ENV_PERSONAL
ENV_INVITE
EXECUTIVE
F sheet
FOLIO
FANFOLD_STD_GERMAN
FANFOLD_LGL_GERMAN
JAPANESE_POSTCARD
DBL_JAPANESE_POSTCARD
LEDGER
LEGAL
LEGAL_EXTRA
LETTER
LETTER_PLUS
LETTER_EXTRA
NOTE
QUARTO
Square(64x64)
Square(128x128)
Square(256x256)
Square(512x512)
A_PLUS
B_PLUS
STATEMENT
TABLOID
TABLOID_EXTRA
FANFOLD_INVITE
FANFOLD_US
CUSTOMSIZE

Default: all paper sizes except B5(ISO), EXECUTIVE, and FANFOLD_INVITE.
Configure the supported paper sizes
defaultpaper Specify the default paper size.
Note: You cannot set the custom paper size as the default paper size.
color bw
color
Configure the supported color modes
defaultcolor Specify the default color
orientation Portrait
Landscape
Configure the orientation
defaultorientation Specify the default orientation
copyinifiles_X, where X stands for a number from 1 to 10. All of the Zan Image Printer specific settings are saved in INI files, the copyinifiles_X keynames list the INI files to copy from the source directory to the printer's configuration directory. Click here to see the list of available INI files

Tip:
An easy way to generate INI files with your presets is to alter your preferences within the Zan Image Printer user interface; all of your changes are saved to the INI files. Example:
For a printer named "Zan Image Printer (BW)", a typical path to the INI setting files for this printer is C:\Documents and Settings\All Users\Application Data\zvprt50\Zan Image Printer (BW) on Windows XP and C:\Users\Public\Documents\zvprt50\Zan Image Printer (BW) on Windows Vista/7.
You can then copy the resulting INI files to your installation directory for redistribution.
Change these default INI setting files to meet your needs before doing an installation.
You can specify different INI setting files for each printer. The setup program will automatically parse each INI file and rename it to the appropriate name. For example, if you specify pdf.ini with one of the copyinifiles_X keynames for a printer named "Zan Image Printer (BW)", and the pdf.ini file contains the image section and the fileformat keyname:
[image]
fileformat=4
Then during the installation, pdf.ini will be renamed to image.ini and copied to the INI settings file folder for Zan Image Printer (BW).


After you have extracted all the files from the self-extracting Microsoft CAB executable zvprt5.exe, please follow the steps below to test your customized installation:
1. Review and change the setup.ini and other .INI files to fit your needs.

2. Open the resource DLLs zvprtres_x86.dll and zvprtres_x64.dll with Microsoft Visual Studio or a third party resource editor. You may change all strings such as "Zan Image Printer" to use your own company name, and you may change the text and images on the About/Registration tabs.

3. Start the installation by calling zvprt5_setup.exe from your own setup program. zvprt5_setup.exe is a stub installer that will auto detect the operating system type (x64 or x86) and load the correct version of the full installer (zvprt5_setup_x86.exe or zvprt5_setup_x64.exe), so that you can easily install Zan Image Printer on both 32 and 64 bit computers.

Use the built-in IExpress utility from Microsoft to repackage all of the installer files into a single self-extracting executable for easy distribution:
a. Open the file zvprt5.sed in a text editor. The zvprt5.sed file is a text file that controls what options are used in building a package.
Edit the TargetName, SourceFiles0, FriendlyName and AppLaunched properties, as necessary:
  • TargetName: Provide the location where you want to put the self-extracting executable.
  • SourceFiles0: Provide the location where the Zan Image Printer installer files are stored.
  • FriendlyName: Package title.
  • AppLaunched: The install program to launch from the package.

  • b. Open a command prompt and go to the location where the zvprt5.sed file is located. Then, run the following command:
    iexpress /N zvprt5.sed
    c. Find the executable at the location you specified for TargetName in the zvpr5.sed file.