Hi,
I am trying to run a batch file automatically after the installation of my project setup. i had create a setup project and add my batch file at application, commands written in batch file is as follows
@ECHO ON
@SET PATH="%CD%\bin";%PATH%
@SET PGDATA=%CD%\data
@SET PGDATABASE=postgres
@SET PGUSER=postgres
@SET PGPORT=5432
@sET PGLOCALEDIR=%CD%\share\locale
%CD%\bin\initdb -D %CD%/data
%CD%\bin\pg_ctl -D %CD%/data -l logfile start

added a custom action install and commit and write a code in installer class like this
Public Overrides Sub Install(ByVal stateSaver As IDictionary)
MyBase.Install(stateSaver)
Dim dir As String = MyBase.Context.Parameters("dir").ToString()
'Change this string to the bat file name
Dim batFileName As String = "postgresql.bat"
'Execute the bat file.
System.Diagnostics.Process.Start(dir & batFileName)
End Sub

Public Overrides Sub Commit(ByVal savedState As IDictionary)
MyBase.Commit(savedState)
Dim dir As String = MyBase.Context.Parameters("dir").ToString()
'Change this string to the bat file name
Dim batFileName As String = "postgresql.bat"
System.Diagnostics.Process.Start(dir & batFileName)
End Sub

but problem is that during the installation process it only launches the black screen ( command screen ) for a while but doesn't execute the command written in batch file.

When this batch file is executed by double click, it works pefectly but from a setup custom action it is not working.

is i m doing the correct process or is ther some other way to run this batch file from custom action
Please help...its urgent