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. Visual Studio
  4. Batch files on Setup Project

Batch files on Setup Project

Scheduled Pinned Locked Moved Visual Studio
sysadminhelptutorialquestionworkspace
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.
  • D Offline
    D Offline
    Derick Magagula
    wrote on last edited by
    #1

    How to execute a batch file on the a deployment project? I tried the custom option and it's telling that .bat is not a valid file type. Please help.

    P 1 Reply Last reply
    0
    • D Derick Magagula

      How to execute a batch file on the a deployment project? I tried the custom option and it's telling that .bat is not a valid file type. Please help.

      P Offline
      P Offline
      ptrckmc249
      wrote on last edited by
      #2

      Instead of using a batch file, it has only a limited set of commands, it is far far better to use a more general scripting language for custom, pre and post build steps. I use biterScripting for this. For example, when building a deployable release, we copy certain important modules suffixed by the build time. I stored the following script into a file postbuild.txt. # Get build time var str build_time set $build_time = gettime() # Copy file (for example) buildparms.h var str file var str build_file set $file = "buildparms.h" set $build_file = $file + "_" + $build_time cat $file > { echo $build_file } # etc. This script is in file postbuild.txt. I then enter the following in the post-build steps in Visual Studio. "C:/biterScripting/biterScripting.exe" "postbuild.txt" That does it for me. You can put tons of code in the postbuild.txt script, and you can even call other (sub-) scripts from that script. We even build all the help files in the pre-build using the same approach. If you are not using biterscripting yet, you can get it free at biterscripting.com. If you already know batch commands, you will know biterscript in no time at all. Hope this helps. Patrick

      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