Re: CreateFile executable file types



"Pavel A." <pavel_a@xxxxxxxxxxxxxxx> wrote in message
news:AE83FA62-E975-4CFB-A36F-1D45E083690E@xxxxxxxxxxxxxxxx
I'm seing that CreateFile( NULL, "batch.cmd", ... ) runs batch.cmd, but
CreateFile( NULL, "batch.js", ... ) gives error 193 : not a valid win32
app. The .js extension is on my PATHEXT.

I guess you are talking about CreateProcess(), not CreateFile().

If I remember correctly, CreateProcess() has some built-in logic for a
handful of file types that are not PE. This is how, for example, 16 bit
executables work: when CreateProcess() understands that the executable is
not a win32 executable, it forwards the execution request to NTVDM.

S


.



Relevant Pages

  • Re: How to launch a exe file in SD card?
    ... a graphics shell. ... Personally I prefer CreateProcess ... for the executables or ShellExecute for the ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: CreateFile executable file types
    ... If you give a poor thing any bogus file with ".com" extension, ... The .js extension is on my PATHEXT. ... I guess you are talking about CreateProcess(), ... executables work: when CreateProcessunderstands that the executable is ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to execute a program from memory
    ... > Why not just use one of the variants of WinExec() or CreateProcess()? ... because those func need either a file or a func to be executed. ... executables, or the GNU/UPX ... ...
    (comp.programming)
  • Re: How to execute a program from memory
    ... > Why not just use one of the variants of WinExec() or CreateProcess()? ... because those func need either a file or a func to be executed. ... executables, or the GNU/UPX ... ...
    (comp.programming)
  • CreateProcess() Problem
    ... Can anyone tell me why this call to CreateProcess() succeeds when the .EXE ... extension is used for the application name, ... // Current directory same as calling process ...
    (microsoft.public.vc.mfc)