Re: Using shellexecute......

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Rick,

This problem is really weird! I tried using a CMD window to test the command string, and it does work to an extent. The problem is that the file pointed to by the argument following the executable is never found! If I put them in the same directory, and don't need to give the full path names it works just fine, but the long path names seems to cause the DOS executable to barf :-(!! The problem with the .bat file approach is I want the DOS argument to be a runtime variable. I guess I could copy the requested file to a temporary file, execute the DOS program and then kill the temporary file......... Egads, it is no wonder that DOS has died on the vine..........

Thanks!!

John



Rick Rothstein [MVP - Visual Basic] wrote:
C:
CD "\Docs\VB Projects\WinHost\WinHost Code"
compile.exe ".\Events Files\events.hcs" > ".\Events
Files\outfile.dat"


On my newsreader, the last line I posted got split into two lines.
The last two lines above should be on a single line in your BAT
file (with a space between the "Events" and "Files" words. Also, I
forgot to mention that the extension of your BAT file should be
.bat even though it is a text file.

Rick


.



Relevant Pages

  • DOS command in XP
    ... I want to execute the following DOS ... command in XP by clicking on a BAT file with this command in it: ... What else do I need to put into the BAT file so that the commands ...
    (microsoft.public.windowsxp.general)
  • Re: How do I...
    ... I initiated the BAT file from the Registry without any ... trying to get the "DOS CMD.EXE" window to either run ... >> file that contained the command worked. ...
    (microsoft.public.windowsxp.setup_deployment)
  • RE: [Full-Disclosure] Oldest Hack Sept. 1970 Just for Fun
    ... So who first discovered the execute bug in 7090? ... DoS a BASIC programmable caluclator with an infinite loop. ... > year that computer programming was offered if I remember correctly. ...
    (Full-Disclosure)
  • Re: Linker strangeness
    ... but it didn't execute correctly. ... DOS, but not under windows. ... What I decided to do until I figure out either a linker that can cope ... it into a second stage loader, I won't end up with a source file that ...
    (alt.lang.asm)
  • Re: System call
    ... And it is what OP got - his bat file was executed by CMD and he got the .bat ... when I can't "execute" .bat file from PHP. ... and security considerations mean this would NOT be possible. ...
    (comp.lang.php)