1. NT/XP ?

Sorry, typo in last post, first parameter of ShellExecute() better as C_UINT.
Does NT/XP still have Command.com clone in WinDir?

include dll.e
include machine.e
constant
 K32=open_dll("kernel32.dll")
,SH32=open_dll("shell32.dll")
,zShellexecute=define_c_func(SH32,"ShellExecuteA",{
   C_UINT,C_POINTER,C_POINTER,C_POINTER,C_POINTER,C_UINT},C_UINT)
,zGetWindowsDirectory=define_c_func(K32,"GetWindowsDirectoryA",{
    C_POINTER},C_UINT)
,zlstrlen=define_c_func(K32,"lstrlen",{C_POINTER},C_INT)
function peek_zstring(atom lpzString)
  return peek({lpzString,c_func(zlstrlen,{lpzString})})
end function
sequence exec_file,exec_dir
atom ret
exec_file="Command.com"
atom path_buff,dir_len
path_buff=allocate(260) --MAX_PATH
dir_len=c_func(zGetWindowsDirectory,{path_buff})
exec_dir=peek_zstring(path_buff)
atom parm3,parm5
parm3=allocate_string(exec_file)
parm5=allocate_string(exec_dir)
ret=c_func(zShellexecute,{0,0,parm3,0,parm5,1})

new topic     » topic index » view message » categorize

2. Re: NT/XP ?

Wolf wrote:

>Sorry, typo in last post, first parameter of ShellExecute() better as C_UINT.
>Does NT/XP still have Command.com clone in WinDir?
>
No, but it has cmd.exe in %WINDIR%\System32

    Martin

new topic     » goto parent     » topic index » view message » categorize

3. Re: NT/XP ?

>From: Martin Stachon <martin.stachon at tiscali.cz>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: NT/XP ?
>Date: Thu, 19 Aug 2004 22:55:56 +0200
>
>Wolf wrote:
>
>>Sorry, typo in last post, first parameter of ShellExecute() better as=20
>>C_UINT.
>>Does NT/XP still have Command.com clone in WinDir?
>>
>No, but it has cmd.exe in %WINDIR%\System32
>

   The path to command.com/cmd.com should be easily found by using=20
getenv("COMSPEC").

>    Martin
>

~[ WingZone ]~
http://wingzone.tripod.com/

=20
e-mail and attachments.=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu