Printer Selection - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

cvas
Posts: 43
Joined: Mon Oct 01, 2007 8:20 pm

Printer Selection

its any way to list in combobox or Listbox or any other control the installed printers of the computer that installer runs,
and user select one of the installed printers and the installer set this printer to the installer property ?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Printer Selection

Hi,

Our user guide contains a tutorial for populating a listbox or combo box. For determining printers you will need to write your own custom action. Since it needs to save the printer list in an installer property, you can use only a win32 DLL or VBScript. Our user guide contains a sample C++ DLL which may help you.

Your custom action can save printer information in the format used by our listbox/combo box actions. This way the custom property set from your code can be used directly in the populate custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cvas
Posts: 43
Joined: Mon Oct 01, 2007 8:20 pm

Re: Printer Selection

i had make a push button that executes a Custom action to retrieve the printer list and user select the printer,
after that i store printer port and name to registry keys.
how i can pass this keys to AI property values? after custom action complete? so to continuous the installation.

Regards
Costas
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Printer Selection

HI Costas,

In VBScript, installer public properties can be accessed like this:

Code: Select all

' read
value = Session.Property("PROPERTY_NAME")

' write
Session.Property("PROPERTY_NAME") = value
In a Win32 DLL you can use the MsiGetProperty and MsiSetProperty functions.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”