SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Running batch with param?

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Running batch with param?
Author Message
yann



Joined: 15 Jun 2001
Posts: 9

Post Running batch with param? Reply with quote

Hi all
I'd like to run a batch file passing parameters:
Call( "shell32.dll", "ShellExecuteA", "lSSlSll", True, &

0, "open", "mailing.bat", &

0, "c:\vbwork\stats", myprog_name)

how can i use something like:

mybat.bat & v1 & " " & v2 & " " & v3 & " " & b & " " & c

Second question:

I'm on W2k and i always have a msg when lunching the shell32 if any of u have used the shell command successfuly, i'll be happy to get some help

Thx for your answers

yann

Mon Aug 20, 2001 3:27 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Running batch with param? Reply with quote

Why not just use the Run statement? It is so much simplier.

Dim process_id, number
Run "c:\\vbwork\\stats\\mybat.bat v1 v2 v3 b c", "c:\\vbwork\\stats", process_id

If you need to calculate paremeters on the fly use
ConcatEx to build the complete command line. The Run statement for the first parameter accepts the complete command line as you you would use it from the DOS prompt.

: Hi all
: I'd like to run a batch file passing parameters: Call(
: "shell32.dll", "ShellExecuteA", "lSSlSll",
: True, &

: 0, "open", "mailing.bat", &

: 0, "c:\vbwork\stats", myprog_name)

: how can i use something like: mybat.bat & v1 & " " & v2
: & " " & v3 & " " & b & "
: " & c

: Second question: I'm on W2k and i always have a msg when lunching the shell32
: if any of u have used the shell command successfuly, i'll be happy to get
: some help

: Thx for your answers

: yann

Mon Aug 20, 2001 9:33 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.