Announcement

Collapse
No announcement yet.

Problem with Shell Doc Commands in XP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 ?

    Thanks
    Lubos

    ------------------
    Lubos
    A view on PowerBASIC
    Lubos
    A view on PowerBASIC

  • #2
    For commands like copy and move, you may need to explictly shell the command processor on XP, e.g...
    Code:
    shell environ$("COMSPEC") + " copy x y"
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      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 'command.com'; 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 'command.com'. 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.
      [URL=http://www.DiyDataRecovery.nl]

      Comment


      • #4
        Thanks Michael and Tom. It's strange. I tried your advices
        and tried PBDOSWin.zip (http://www.powerbasic.com/files/pub/docs/PBDOSWin.zip -
        - 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.
        L.



        ------------------
        Lubos
        A view on PowerBASIC
        Lubos
        A view on PowerBASIC

        Comment

        Working...
        X