Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

how to redirect standalone exe output to text file


1 reply to this topic

gmpk82

gmpk82
  • Full Members
  • 40 posts

Posted 20 May 2014 - 06:27

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;


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 May 2014 - 16:51

Try putting configDirPath ^ "resetssvop.log" in a variable. I'm not sure how well mixing + and ^ will work. Output the strings in a MessageBox or use the debugger to verify the actual strings. Does the same work from a command prompt or batch file?