Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6151989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:51:00+00:00 2026-05-23T19:51:00+00:00

Is it possible to control build event batch file behaviour depending on whether the

  • 0

Is it possible to control build event batch file behaviour depending on whether the build is run from the IDE or the command line.

We have several versions of our product. It contains COM objects that need to be registered. This COM registration is done by a batch file called from a custom build step in the respective project.

The problem is that if a developer runs an automated build for one version from the command line in the background while working on another version in the IDE the automated build will register the COM objects from the version not being worked on in the IDE.

So, is there a way to control whether the registration takes place depending on if the build is done in the IDE or from the command line using devenv?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:51:01+00:00Added an answer on May 23, 2026 at 7:51 pm

    I don’t know that VS “knows” how it’s being run. I’d be surprised if there wasn’t something somewhere that flags whether or not it’s being run from the command line, however we may not have any access to that.

    Perhaps this can be solved using a build configuration. When you build from the command line, set the build configuration value to a configuration that excludes the COM registration step. I think you should be able to write into your post build batch a test for the appropriate build configuration (I’m almost sure that VS has a build macro value for the current build config) and branch the logic accordingly. Of course, this means each developer needs to be aware of this. Although you could make a batch file in the project for doing these builds which includes the necessary build switches/values.

    I’m curious what your scenario is that you have one developer building the same application two different ways simultaneously.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some SONY Cameras have a FireWire interface. Is it possible to control any camera
Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that
Is it possible to control the format of the password that is automatically generated
Possible Duplicate: How to embed a web browser control in a cross-platform application? I'd
Is it possible to use an ocx (ActiveX Control) on a winform (probably adding
Is it possible to configure the TreeView control in the Silverlight tookit such that
Is it possible to set up a Grid or other container control to be
Is it possible to add instances of the same user control when an add
Is it possible to view an MS Access report in the .Net ReportViewer control?
Is it possible to take a DLGTEMPLATE and use it as a CWnd-derived control

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.