SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SYS_Execute batch file

    When I run this: SYS_Execute("E:\a\b\c\d\abc.bat")

    I get an error:
    [ ] *** Error: Unable to process E:\a\b\c\d\abc.bat, File is of an unsupported type for this command.
    [ ] Occurred in AGT_SYS_Execute
    [ ] Called from SYS_Execute at 4test.inc(674)
    [ ] Called from main at rid.t(7)

    Does anyone know why? I copied this path from the shortcut on the desktop. If I double click on the shortcut, it launches the app ok. But SYS_Execute doesn't work.


  2. #2
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    Thanks, David. The SYS_SetDrive helped and the app now launches. Another problem I am having is after using SYS_Execute to launch the app, the script wouldn't end until the app is closed. The Help also says this is the case. How do I get around this problem?

  3. #3
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    Use the Start method instead. Something like:


  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    Irvine, CA
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    Here is a function we use for running commands:

    ------------------
    Matt Gray
    Kofax Image Products

    [This message has been edited by MattGray (edited 11-21-2002).]

    [This message has been edited by MattGray (edited 11-22-2002).]
    Matt Gray

  5. #5
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    [/B]<HR></BLOCKQUOTE>

    James,
    The start method helps a bit if I use it together with SetDir(), but I get this error when I run the above: "*** Error: Window '[MainWin]*' is not unique" Any quick solution to fix it?

  6. #6
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    Put this code right before the call:

    Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE)

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  7. #7
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    Apparently, there are some issues with launching an application in the DOS prompt too from a different drive. For example, from C:\, I tried to launch "E:\..." and it would fail. If I change the directory to where the file I want to launch is, then it is ok.

    Has anyone worked with DOS cmd dialog (in Win2000)? I tried to do window declaration of the dos window and used TypeKeys() set some characters. But the blank DOS dialog area is not recognized. SYS_Execute and wWin.Start() doesn't work for me to work around the problem, which is why I have to resort to launching the app from the DOS dialog.

    Or double click on the app shortcut on the desktop. But I can't get Silk to record the icons on the desktop. Does anyone know how?

  8. #8
    Senior Member
    Join Date
    Jun 1999
    Location
    Fremont, CA, USA
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_Execute batch file

    I have been having no problems launching DOS batch files (or VBS or java) using SYS_Execute() with a long path name. However, I do think you need to be on that drive. I only have a C drive, so have no issues. If your on drive C, but need to execute something on drive E, try the following:

    SYS_SetDrive ("E")
    SYS_Execute("E:\a\b\c\d\abc.bat")

    if that doesn't work, make a batch file in your C drive that changes to drive E, then executes the desired batch script.



    ------------------
    David Genrich
    david.genrich@e2open.com
    david@linuxpuppy.net

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:07 PM.

Copyright BetaSoft Inc.