Ok, here I am again :rolleyes:

Now I've got a problem to execute a batch file. My program hands over parameter to this batch file. When I consign only one or no parameter all is okay. But when I consign more than one parameter either nothing happens or the DOS-promt is opened instead of the batch file. I've already quoted the single parameters. But without having success. Here a listing of the used strings to help you understanding my trouble:

; hWindow : handle of the program-window
; Open : contains "OPEN", 0
; File : contains "e:\_marwin\mds\bin\batch.bat", 0
; Param : contains "e:\_marwin\mds\bin e:\_marwin\mds e:\_marwin\mds\mds\inc", 0

invoke ShellExecute, hWindow, ADDR Open, ADDR File, ADDR Param, 0, SW_SHOWNORMAL

I thank you already in advance for your responses
Posted on 2002-06-19 03:41:33 by Marwin
Does anyone know what I mean, or don't you know how to solve this problem ?? :(
Posted on 2002-06-19 08:02:55 by Marwin
>either nothing happens or the DOS-promt is opened instead of the batch file

The "dos prompt" indicates at least that the file was executed.
Please post your batch file... perhaps you have a error there.

BTW, you should also NOT set the workdirectory to "0".
Posted on 2002-06-19 08:10:07 by bazik
i am a foool. i'm so new to asm i havn't even tried ShellExec (some thing i do a lot in c) or even using a path.
i did this in masm and had no probs...

Open db "OPEN", 0
File db "c:\code\tryme.bat", 0
Param db "c:\autoexec.bat c:\config.sys", 0
WorkPath db ".\", 0
invoke ShellExecute, hWin, ADDR Open, ADDR File, ADDR Param, addr WorkPath, SW_SHOW

echo ..first one
type %1
echo ..second one
type %2

and had no problems.again, sorry for the over hasty post.
Posted on 2002-06-19 09:05:24 by Kremen
Ok, I'll try it again with respect to your answers. Hope it works now.:alright:
Posted on 2002-06-20 05:11:25 by Marwin