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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Execute Shell Script and Batch Files

Execute Shell Script and Batch Files

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpvisual-studiolinuxtools
6 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.
  • A Offline
    A Offline
    AmbiguousName
    wrote on last edited by
    #1

    Hello. How do I execute certain batch files and shell scripts along with my project? Are these settings specified in Pre Build and Post Build events in visual studio? Thanks for any input.

    This world is going to explode due to international politics, SOON.

    L 1 Reply Last reply
    0
    • A AmbiguousName

      Hello. How do I execute certain batch files and shell scripts along with my project? Are these settings specified in Pre Build and Post Build events in visual studio? Thanks for any input.

      This world is going to explode due to international politics, SOON.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      AmbiguousName wrote:

      Are these settings specified in Pre Build and Post Build events in visual studio? Thanks for any input.

      Yes, depending on which part of the build process you want them.

      A 1 Reply Last reply
      0
      • L Lost User

        AmbiguousName wrote:

        Are these settings specified in Pre Build and Post Build events in visual studio? Thanks for any input.

        Yes, depending on which part of the build process you want them.

        A Offline
        A Offline
        AmbiguousName
        wrote on last edited by
        #3

        All right let's suppose I want Pre Build. Now how do I tell Visual Studio to use xxxx.sh and xxxx.bat files?

        This world is going to explode due to international politics, SOON.

        L 1 Reply Last reply
        0
        • A AmbiguousName

          All right let's suppose I want Pre Build. Now how do I tell Visual Studio to use xxxx.sh and xxxx.bat files?

          This world is going to explode due to international politics, SOON.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Go to the Project Properties, click on Build Events, Pre-build, and add the details as required.

          A 1 Reply Last reply
          0
          • L Lost User

            Go to the Project Properties, click on Build Events, Pre-build, and add the details as required.

            A Offline
            A Offline
            AmbiguousName
            wrote on last edited by
            #5

            Since I have never done this, so bear with me. Do I have to add some kind of path? Suppose a xxxx.bat file is at desktop, would the entry be like this: call ..\..\Desktop\xxx.bat ?

            This world is going to explode due to international politics, SOON.

            L 1 Reply Last reply
            0
            • A AmbiguousName

              Since I have never done this, so bear with me. Do I have to add some kind of path? Suppose a xxxx.bat file is at desktop, would the entry be like this: call ..\..\Desktop\xxx.bat ?

              This world is going to explode due to international politics, SOON.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Yes, the same as you would do in any application or command shell. However it probably makes more sense to add the batch files into your project directory so they stay with the project. That also allows you to manage them within your source control system as well.

              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