i have a problem that i cant find a solution for , and please , i need some help from some one

i m asked to make a project to pack a visual studio project -which is the easy part- and then its required to make the installer make a file and write in it the installation status , whether the package was installed successfully or the package failed to install
this is the main problem , i dont know how to make advanced installer create for example an exe file and write in it the installation status of the package , whether successful or failed , can anyone help me please and tell me how to solve this problem ?
thanks very much inadvance
Regards.