none
Driver development with Visual Studio 2015 - How to run a batch on all builds RRS feed

  • Question

  • I'm migrating my driver and its related applications from WDK command-line environment to VS2015. I'd like to automate the entire process including the signing of the binary files, creating an installer (inno setup) and signing it.

    The installer supports both x86 and x64. It installs the corresponding binaries depending on the target machine. Hence, compiling the Inno Setup script and signing the installer must be done after both x86 and x64 drivers are complete.

    One way to do it is to write a batch file that compiles the VS solution (twice) from the command line then compiles the installer and lastly signs the binary.

    I wonder if this task can be accomplished from within VS user interface.

    Tuesday, September 22, 2015 8:00 AM

All replies

  • Hi,

    You could create a custom action that runs your batch file on Install:
    https://msdn.microsoft.com/en-us/library/dd997001.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/zh-cn/library/aa480721.aspx

    Or you could also consider having your application do the work on first start.

    Wednesday, September 23, 2015 9:11 AM
  • Thank you.

    This is not a ClickOnce case. I need to run some batch files after all 4 build are complete.

    Friday, September 25, 2015 4:07 AM
  • hi,

    And then How do you publish your application?

    Friday, September 25, 2015 8:31 AM
  • I will try to rephrase my question.

    My project is a Windows Device Driver accompanied by some desktop applications.
    There must be a x64 driver set of files and a x86  driver set of files.
    I want to post a single installer (Inno Setup) that installs the correct driver according to the target's architecture.

    So I have to build the Visual Studio Solution for each architecture then run the Inno Setup compiler on the two sets of binaries. You don't have to know what Inno Setup means - think of it as a batch file. Is it possible to run a batch file after the execution of a VS2015 batch build?

    Friday, September 25, 2015 7:53 PM
  • I've never used batch build.

    When I do multiple builds it's usually on a build server and a series of msbuild commands in a bat file.

    Perhaps that approach might suit you.

    With batch build, does the post build event fire?

    Because if so you can stick your dos style commands in the Post-build event command line.


    Saturday, September 26, 2015 3:17 PM
    Moderator
  • Apparently, in the absence of a "Post Batch Build" event, I will have to create a batch file per your suggestion. 

    Thank you.

    Saturday, September 26, 2015 5:51 PM