Wednesday, December 08, 2004

Extract MSI files from EXE

Most applications come packaged as a single EXE file which contains the MSI & CAB files. In order to deploy these applications using Group policy the individual files need to be extracted:

To extract:
file.exe /t::\Folder /c

You can also apply updates to existing applications. Firstly extract the msp file as above.

To patch:
msiexec /a msifile.msi /p mspfile.msp


N.B. In the case of a number of applications (such as office) you first need to create an administrative installation point by running setup with the '/a' switch.

In the case of office further customization can be performed by using the office resource kit, available at link.

Wednesday, December 01, 2004

ASP.NET, Datagrid, Textbox, Formatting

Link

I used the above link & created a single formatting function which replaced certain characters (such as vbcrlf) with their HTML equivilents. This was placed in a standard module.

Function ConvertToHTML(ByVal arg As Object) As String
Dim strTemp As String
strTemp = Replace(arg, vbCrLf, "BR")
Return strTemp
End Function


The databinding for the label control (the control which displays the data rather than editing it) was then modified from:
DataBinder.Eval(Container, "DataItem.TaskComments") to ConvertToHTML(DataBinder.Eval(Container, "DataItem.TaskComments"))

The aspx page cannot read a module function, producing the error 'Function not declared'. The solution to this was to create a wrapper function in the code behind page.

Public Function ConvertToHTML(ByVal arg As Object) As String
Return modFunctions.ConvertToHTML(arg)
End Function