[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - ExecuteAndWait does not work correctly

ExecuteAndWait does not work correctly

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

ExecuteAndWait does not work correctly

Postby chgerwig » Tue Sep 14, 2004 1:49 am

Hi!

I want to use following script with the ExecuteAndWait command:

Code: Select all
AddStrings $a "c:\programme\gnupg\gpg.exe --verify c:\temp\message.sig 2> c:\temp\result.txt"
ExecuteAndWait $a


I use Win2k and on the command line this works perfect. Out of Pocomail with this script there is no creation of the file result.txt

Any hints or suggestions?
Bye,
Christian
------------
Reseller of PocoMail in Austria
chgerwig
Poco Tourist
 
Posts: 17
Joined: Tue Aug 24, 2004 12:27 am
Location: Vienna, Austria

Postby gert » Tue Sep 14, 2004 3:23 am

I don't think you can do redirection ( 2>) with the ExecuteAndWait command.
I bet it will work if you remove "2> c:\temp\results.txt" from it.

If you need those results, perhaps put those complete command line (gpg.exe -- ....) in a .cmd file, and try

ExecuteAndWait "c:\temp\myCommand.cmd"

Gert
gert
Poco Tourist
 
Posts: 43
Joined: Sun Jul 25, 2004 4:20 pm

Postby Hogyt » Tue Sep 14, 2004 4:20 am

Hi,

You need to specify parameters as the second argument to ExecuteAndWait and if the redirection is the problem then try running it through cmd like this:

Code: Select all
Set $a "/c c:\programme\gnupg\gpg.exe --verify c:\temp\message.sig 2> c:\temp\result.txt"
ExecuteAndWait "cmd" $a


You may like to escape the backstrokes so \ becomes \\ in case you accidentally specify a control code, eg. if \result.txt was \notes.txt then the \n would be converted to a newline but \\notes.txt would be fine.

Hope that helps!
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby chgerwig » Tue Sep 14, 2004 11:22 pm

Thanks Hogyt,

your are great! It worked as you described it. Now I don't need anymore an external batch file for my GnuPG decryption/verify script. I will post this script shortly.
Bye,
Christian
------------
Reseller of PocoMail in Austria
chgerwig
Poco Tourist
 
Posts: 17
Joined: Tue Aug 24, 2004 12:27 am
Location: Vienna, Austria

Postby Hogyt » Tue Sep 14, 2004 11:53 pm

Great! I'm looking forward to seeing the script! :D
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron