How to develop specific installation application.exe in C#
===

I want to develop an application to Install encapsulate the setup Cache DB from a batch file. My question may be difficult to answer but I'm looking for some idea or mechanism to proceed. Please guide me.

    With 2 modes of Installation :
    	With Arguments on command line :
		`/SILENT : display or not the windows
		/XMLCFG : keep the appconfig.xml :
		INSTALL_DIR=C:\InterSystems\Cache

		INSTALLERMANIFEST=%SOURCE_INSTALL%\Installer.xml
		JOURNAL_ALTERNATEDIRECTORY=d:\databases\Journals
		DBDIRECTORY=c:\rapid\data\databases\cache
		INCREMENTALBACKUP_DIRECTORY=d:\databases\Backup
		FULLBACKUP_DIRECTORY=d:\databases\Backup `
		
	Without Arguments on command line => display Dialogue box with this field
	
	check directory		

    1) detect x64 bit or x86 bit
    
    1.a) check and install if needed vcredist_x64.exe or vcredist_x86.exe
    
    2) unzip cache db 86 or 64 (N:\Tools\DATABASE\CACHE) cache-2010.2.6.953-win_x64.exe or cache-2010.2.6.953-win_x86.exe
      need cache key 
      MSI_FILE=%CURRENT_DIRECTORY%\cache\ cache_x86.msi / 64
    
    3) run exec msi file (Trunk\Src\Sources\Database\Cache\Silent Install)
    CURRENT_DIRECTORY=F:\CacheSilentInstall
    
    msiexec /i %MSI_FILE% ALLUSER=1 /qn INSTALLDIR=%INSTALL_DIR% ADDLOCAL=ALL INSTALLERMANIFEST=%INSTALLERMANIFEST% INSTALLERMANIFESTPARAMS=%MYINSTALLERMANIFESTPARAMS% /l .\Install.Log
    
    4) run csystray.exe
    START %INSTALL_DIR%\bin\csystray.exe

