View Full Version : Customer Info

02-25-2004, 09:53 AM
I would like to capture user keyed information on customer name and company into registry during the install. I browse the document Q101195 but it is not the case. Could any one advise how to do it?

02-25-2004, 10:39 AM
Are you using Express 2.x? That KB article is applicable to 2.x. This forum caters to questions on 4.x and 5.x.

02-25-2004, 10:34 PM
I am using v5 with sp2. If the article takes care on v2, are there any similar thing in v5

02-26-2004, 11:38 AM
There are some MSI properties you may use. For a complete list of MSI properties, please refer to Property Reference (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/property_reference.asp) in MSDN Library (http://msdn.microsoft.com/library/).

02-26-2004, 12:09 PM
I try to use the vbscript in the custom action but no values is created.

The information is stored in the the following properties, you would have to manually add these to the registry.


ISX_SERIALNUM (If Applicable)

If using VBScript custom action to write these to the registry you could use something like this.

function AddUserDetailsToRegistry()

Dim UserName, CompanyName, SerialNum
UserName = Session.Property("USERNAME")
CompanyName = Session.Property("COMPANYNAME")
SerialNum = Session.Property("ISX_SERIALNUM")

Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\Software\Temp\UserName", UserName

WshShell.RegWrite "HKLM\Software\Temp\CompanyName", CompanyName

WshShell.RegWrite "HKLM\Software\Temp\SerialNumber", SerialNum

end function

Is this correct to do so in captured the user keyed info by using the session property.

02-26-2004, 12:32 PM
If your custom action is scheduled too late in Execute Sequence, i.e., in deferred execute sequence, the property will not be available. You will need to move it up to immediate execute sequence. There are discussions on this in the forum, you may want to take at look at them.

Alternatively, you can use property in Registry, e.g., [USERNAME].