Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LaunchAppAndWait

114 views
Skip to first unread message

batg...@gmail.com

unread,
Mar 29, 2006, 2:14:12 PM3/29/06
to
Hi all,

I'm having problem launching a .bat file within the script. I'm trying
to launch script.bat and take in a text file as the parameter. This is
my code.

svCmd=TARGETDIR ^ "conf" ^ "script.bat";
svParam=LICEFILE_NAME;
ChangeDirectory(TARGETDIR ^ "conf");

if (Is(FILE_EXISTS, svCmd) = 1) then
if (LaunchAppAndWait("\"" + svCmd + "\"", svParam,LAAW_OPTION_WAIT) <
0) then
SprintfBox(WARNING,"", "LaunchAppAndWait failed! Error:%i",nResult);
abort;
else
MessageBox("Success",INFORMATION);
endif;
WriteLine(nvInstallLog,"found" + svCmd);
else
WriteLine(nvInstallLog,"ERROR - unable to find file: " + svCmd);
endif;
-----------------------------------------------------
I've also tried (LaunchAppAndWait(svCmd , svParam,LAAW_OPTION_WAIT)

I would get a message that the system cannot find the text file. I
checked and that text file is in the same directory as the script.bat.
-----------------------------------------------------------
The other thing that I've tried was:

svCmd=TARGETDIR ^ "conf" ^ "script.bat";
ChangeDirectory(TARGETDIR ^ "conf");

if (Is(FILE_EXISTS, svCmd) = 1) then
LaunchAppAndWait("\"" + svCmd + "\"","\"" + TARGETDIR ^ "conf" ^
"Lice.txt" + "\"",LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN |
LAAW_OPTION_SHOW_HOURGLASS)
else
WriteLine(nvInstallLog,"ERROR - unable to find file: " +
svCmd);
endif;

It returned the path to the txt file, but not the content of the file.

Does anyone has any other idea how I can make this work?

Thanks,
JL

0 new messages