Originally posted by Vortex



Right line is: cmd db 'c:\windows\explorer.exe',0

Sorry I first just copy/pasted your string and probably forgot to remove space.
try to compile and then run it. I'm sure it should work.
Posted on 2002-12-11 07:27:18 by Spot
more than that as I've mentioned earlier explorer.exe is always in the system path
so the line
db 'explorer.exe',0
will all so work
Posted on 2002-12-11 07:30:18 by Spot

I din't run the program yet but look at this
cmd db 'c:\windows\explorer.exe '
There is a string in your code that is not null terminated and there is an explicit SPACE
change it on
cmd db 'c:\windows\explorer.exe ',0

natas has pointed out a mistake in my first post. Program name can not contain
parameters. That's why it didn't work. Your code just has synatx errors.

Spot, there is no error with the defined string. The string is just terminated
elsewhere.


cmd db 'c:\windows\explorer.exe '
parameter db 'http://www.yahoo.com',0 <- zero-termination

refering to the 'cmd' string will give you this:
'c:\windows\explorer.exe [url]http://www.yahoo.com[/url]'
Posted on 2002-12-11 07:56:41 by natas
Yes it was terminated somewhere as soon as 0x0h was met. Since this string didn't contain the program name the fellow wanted to run I assumed it as a wrong string. Formally it is a right sequence of chars that is not terminated by null in the right place.
I don't think he intentionally didn't put 0 at the end of the string.
Posted on 2002-12-11 12:47:47 by Spot

Formally it is a right sequence of chars that is not terminated by null in the right place.
I don't think he intentionally didn't put 0 at the end of the string.


Friends,
Thanks for your interest.

Spot,
I knew what I made,intentionaly I didn't put the null at end of the string.This is equivalent to:




cmd db 'c:\windows\explorer.exe [url]http://www.yahoo.com[/url]',0 (Just as Natas described)



Still,I couldn't manage to solve the problem.:confused:

Thanks again Spot and Natas
Posted on 2002-12-11 13:53:53 by Vortex
Vortex, Didnt you read the first post i have in this thread?

Look below, the reference to the cmd variable is now located at
the commandline for createprocess. Just test it. :)
invoke CreateProcess,0,ADDR cmd,0,0,0,NORMAL_PRIORITY_CLASS,\
0,0,ADDR startinfo,ADDR processinfo
Posted on 2002-12-11 23:20:15 by natas
Thanks Natas,it works fine.I think both of these parameters must not to be separated ;)

Regards,

Vortex
Posted on 2002-12-12 04:05:39 by Vortex