Sunday 2 January 2011

Change type of TextBox on Installation screens


Many time during the installation of an application which requires database access - we may ask for database authentication details on the installation/setup screens.

If we have a requirement of changing one of the text fields to a password field - how do we achieve that?

The textboxes available on setup forms - they do not offer any attribute other than Name, Property...

We need to use Orca and change the field 'Attribute' of the control you want to modify. The new value of 'attribute' should be '2097159'. (by default it is 7).

If you are using the "WiRunSQL.vbs" and updating it in a post-build event then the query is:

"UPDATE `Control` SET `Control`.`Attributes`='2097159' where `Control`.`Control`='Edit4'"

('Edit4' is the name of control)

IMP: In SQL queries for MSI it is important to use ` and not ' to specify the column names.

EDIT: We could also have used transforms to update the MSI. Transforms can be created using Orca and applied using "msitran" tool.


Modifying MSI programmatically


If you are using Orca to make changes to MSI every time before a release, then you may look into this:

This approach uses WiRunSQL.vbs to update MSI (this can be added to post-build event)

Shorts - week 3, 2022

Post with links to what I am reading: 1. A very good post on different aspects of system architecture: https://lethain.com/introduction-to-a...