Results 1 to 5 of 5

Thread: run batch-file in "apps" ? Which windowname?

  1. #1
    Newbie
    Join Date
    Jul 2005
    Location
    Rosenheim, Germany
    Posts
    55

    run batch-file in "apps" ? Which windowname?

    Can someone tell me how i can start batch files with CF 1.4?

    my external.xml contains this:

    <PATH>c:\windows\system32\cmd.exe</PATH>
    <PARAMETERS>/C path_to_my_batch.cmd</PARAMETERS>
    <WINDOWNAME></WINDOWNAME>
    <DISPLAYNAME>OFF</DISPLAYNAME>
    <PAUSEMUSIC>False</PAUSEMUSIC>
    <LINECONTROL>NONE</LINECONTROL>
    <MUTEONEXIT>False</MUTEONEXIT>
    <STARTFULLSCREEN>False</STARTFULLSCREEN>
    <ENABLEHEADER>True</ENABLEHEADER>

    Which "WINDOWNAME" I've to use, that my batchfile will run?

  2. #2
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    7,780
    Blog Entries
    32
    find out whatever the window name for cmd.exe is. Shouldnt that work?

  3. #3
    Newbie
    Join Date
    Jul 2005
    Location
    Rosenheim, Germany
    Posts
    55
    this i allready tryed... sadly it doesn't work

    The window name is "C:\Windows\system32\cmd.exe"

  4. #4
    Low Bitrate Bokky's Avatar
    Join Date
    Jan 2005
    Location
    Ham, Belgium
    Posts
    76
    Euh.... Embedding bat files works perfect!

    The main problem is that CF reacts just like XP reacts
    Try to run your .bat file from windows explorer... you probably see windows command pop up execute the batch code and close again. This is exactly what happens in CF.

    Try this:

    -create a .bat file (test.bat) and execute "dir" in it.
    -windowname: "c:\windows\system32\cmd.exe"
    -path: "c:\test.bat"

    You'll see that in CF the embed area turns into gray... windows is closed (end of code)

    Replace in the "test.bat" file "dir" with "edit" and try again...

    You will see now that everything works perfect (exept for horizontal window-resizing, standard not possible with a command window).
    "edit" is now running embedded and is a pure DOS program... once you close "edit" the embedded window closes.

    I hope this makes things more clear...
    EPIA M10K, 512MB RAM, 60GB
    [##########] 100% (since 1 March 2005)

    snowboarding.be - bokky.com

  5. #5
    Newbie
    Join Date
    Jul 2005
    Location
    Rosenheim, Germany
    Posts
    55
    Ahh.. ok, thanks!
    Now it works!

Similar Threads

  1. batch file "pause" question
    By grandamp3 in forum Software & Software Development
    Replies: 11
    Last Post: 02-20-2008, 10:07 PM
  2. Replies: 1
    Last Post: 08-31-2004, 06:19 AM
  3. batch file programming LCD's
    By mosh in forum LCD/Display
    Replies: 6
    Last Post: 05-19-2002, 01:55 AM
  4. Program or batch file to control DTR on a serial port
    By percyt2k in forum Software & Software Development
    Replies: 7
    Last Post: 12-17-2001, 04:41 PM
  5. batch file playlist creation size limit?
    By AndyM in forum Software & Software Development
    Replies: 6
    Last Post: 08-08-2001, 01:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •