cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gmpk82
Level 5

how to redirect standalone exe output to text file

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;
Labels (1)
0 Kudos
(1) Reply
GrantK
Level 7

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
0 Kudos