No announcement yet.

Problem with Shell Doc Commands in XP

  • Filter
  • Time
  • Show
Clear All
new posts

  • Lubos Svoboda
    Thanks Michael and Tom. It's strange. I tried your advices
    and tried ( -
    - Modifying PB/DOS Applications to Achieve Compatibility with ALL
    Windows Versions by Jim Cody) too.
    Problems persist. Well, I can rewrite code to ommision SHELL and
    I probably do it.

    A view on PowerBASIC

    Leave a comment:

  • Tom Kuurstra
    If i recall correctly 'move' is an internal command for XP, not so for 98.
    That means that it should be run through the shell. Use something like
    this as the string that executes the shell :

    "cmd.exe /c <insert your command(s) here>".

    This would be a cleaner approach anyways, it's good practice to always
    use this setup when shelling a command.

    Or write a batch file from your app and shell to that, works too.

    There's another thing: if you run a 'true' dos box (using the actual DOS emulation)
    the command interpreter would be ''; if you're running from a windows xp
    console i'm not really sure what the command interpreter would be. 'cmd.exe' should
    be the default for windows xp console but since you're running a 16 bit app windows
    may well change that to ''. Test this first by shelling to dos from the
    app (just use a shell command without parms) and type 'set' to
    list the environment settings, they will tell you what you need to know.

    Leave a comment:

  • Michael Mattias
    For commands like copy and move, you may need to explictly shell the command processor on XP, e.g...
    shell environ$("COMSPEC") + " copy x y"

    Leave a comment:

  • Lubos Svoboda
    started a topic Problem with Shell Doc Commands in XP

    Problem with Shell Doc Commands in XP

    First fragment:

    shell "move c:\podpora\*.602 c:\asistent\ > c:\podpora\nulafile"

    Second frafgment:

    fun$=" copy docas.sou "+HTM$
    if HTM$<>"" then shell fun$

    Both fragments work excellent under W98SE but not under WinXP.
    Why? Are another problems with CMD.EXE an PB 3.5 ?


    A view on PowerBASIC