Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help about Windows Batch file.

Help about Windows Batch file.

Scheduled Pinned Locked Moved C / C++ / MFC
c++htmliosxmlhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pix_programmer
    wrote on last edited by
    #1

    Hi! I'm calling an exe from a Batch file using CALL statement. The exe is not the same folder with batch file. The exe is inside some other folder. The exe has some dependencies(VC++ DLL's). How to include/call those DLL's also inside the CALL statement so that my exe would run without errors? The code that I use is:

    PushD .
    Cd ..
    Call Gen /AssetManager:Disable /DisplayErrors:off /ReturnErrorsCount:off /Log:Enable /Log:Html /Log:Verbose /Window:Normal /CreateObjectHash /RemoveSources:On /CreateResourceHash /GenerateDisplayLists:On /GenerateSceneLists:Off /GeneratePreDrawOT "france_1222\Test.xml" france_1222\%_SDF_% "iPhone"
    PopD

    "Gen" is my exe name.

    J 1 Reply Last reply
    0
    • P pix_programmer

      Hi! I'm calling an exe from a Batch file using CALL statement. The exe is not the same folder with batch file. The exe is inside some other folder. The exe has some dependencies(VC++ DLL's). How to include/call those DLL's also inside the CALL statement so that my exe would run without errors? The code that I use is:

      PushD .
      Cd ..
      Call Gen /AssetManager:Disable /DisplayErrors:off /ReturnErrorsCount:off /Log:Enable /Log:Html /Log:Verbose /Window:Normal /CreateObjectHash /RemoveSources:On /CreateResourceHash /GenerateDisplayLists:On /GenerateSceneLists:Off /GeneratePreDrawOT "france_1222\Test.xml" france_1222\%_SDF_% "iPhone"
      PopD

      "Gen" is my exe name.

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      You don't need the CALL command to execute an executable program from within a batch file. The CALL command is provided to execute other batch files from within a batch file or call a local subfunction. Each executable file tries itself to resolve DLL dependicies. If your application terminates due to missing DLLs, you must place the DLLs in common directories or modify the DLL search pathes. Common DLL directories are:

      • The directory from which the application loaded.
      • The system directory.
      • The Windows directory.
      • The directories that are listed in the PATH environment variable.

      To add directories that are searched by your application you may use the API function SetDllDirectory(). To add directories using a batch file, append them to the PATH environment variable.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups