PDA

View Full Version : how to redirect standalone exe output to text file



gmpk82
05-19-2014, 12:15 PM
hi Folks,

I am trying to redirect standalone exe output to txt file , I am following below command but it is not working. command execution itself failing. If I don't redirect it is working.Mostly this exe is written in C++. can some help me to make it work.


configDirPath = INSTALLDIR ^ "API\\config";
LongPathToQuote(configDirPath,TRUE);

szexePath = INSTALLDIR ^ "CLI\\bin";
szAppPath = szexePath ^ "cfg.exe";
LongPathToQuote(szAppPath,TRUE);
svHostnameLowerCase = "Hostname";
nRes = LaunchAppAndWait ( szAppPath, "-node -password " + svHostnameLowerCase + " > " + configDirPath ^ "resetssvop.log", LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN );
nReturnCode = NULL;
nReturnCode = LAAW_PARAMETERS.nLaunchResult;

if ( nReturnCode != 0 )then
MessageBox("Fail", INFORMATION);
else
MessageBox("SUCCESS", INFORMATION);
endif;

GrantK
12-19-2014, 04:55 PM
You will want to use the -v command:
ISCmdBld.exe -p "C:\InstallShield 2012 Spring Projects\Test Project.ism" -r "Release 1" -c COMP -a "Product Configuration 1" -v > C:\log.log

Verbosely Log a Command Line Build
https://flexeracommunity.force.com/customer/articles/en_US/HOWTO/Verbosely-Log-a-Command-Line-Build

ISCmdBld.exe
http://helpnet.installshield.com/installshield20helplib/installshield20helplib_CSH.htm#helplibrary/ISCmdBldParam.htm

Grant