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 8464173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:39:39+00:00 2026-06-10T14:39:39+00:00

During installation, my application will: Step A, Look for C:\WebService directory. If found do

  • 0

During installation, my application will:

Step A, Look for C:\WebService directory. If found do following:

copy *.bat      --> C:\WebService\
copy boost*.dll --> C:\WebService\libs\
copy myApp.dll  --> C:\WebService\plugins\

Step B, If not found, do following:

copy *.bat --> [LocalAppData]\myApp\bin\
copy *.dll --> [LocalAppData]\myApp\libs\

How can I do this?

EDIT:

I had finished Step 2 by:

  1. Create a source directory:

    src\bin
    src\libs

  2. Copy files to these subdirs

  3. Use heat to scan the src directory and generate group into wxs file.

The problem here is, looks like for Step A, I have to do the same again. But there are tons of *.dll, copying them again to another directory doesn’t look like a good idea.

  • 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-06-10T14:39:41+00:00Added an answer on June 10, 2026 at 2:39 pm

    Ok, finally worked it out.

    In short, I do this by writing a C++ program to help.

    Details follows..

    My wxs starts like:

    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='WebDir'>
          <Directory Id='INSTALLDIR' Name='$(var.ProductName)'/>
      </Directory>
      <Directory Id='DefaultDir'/>
    </Directory>
    

    Now use heat to harvest my source directory to generate another wxs file for candle and light to link

    Then goes my C++ program, it was designed to

    1. Scan the whole generated wxs file to create another directory structure.
    2. Replace all IDs of Directories, Components and Files to make them unique.
    3. Generate new GUIDs for all new components.
    4. Gather all new component IDs to create a new component group.

    This new component group can be referenced to be installed conditionally, depends on whether there is a registry key, or whether the directory is found, in my case it is:

      <Feature Id='RuntimeChrome' Level='1'>
        <Condition Level='0'>NOT INSTALLDIR_REGCU AND NOT INSTALLDIR_REGLM</Condition>
        <ComponentGroupRef Id='WebGroup' />
      </Feature>
      <Feature Id='RuntimeDefault' Level='1'>
        <ComponentGroupRef Id='DefaultGroup' />
      </Feature>
    

    With these wxs files, the package can be installed into different places under different scenarios.

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

Sidebar

Related Questions

I know Installers can setup File Associations for your Application during the installation process,
In a small application, I'm writing, during installation phase, the user must enter detail
During un-installation, user will be asked Are you sure to uninstall .... Then the
Can we create a directory on the internal storage of the device during application
I have installed an application and each file saved is .mdf. During installation of
I have an application that changes some registry values during installation. I am changing
I want to create personal folders during installation. I did the following steps: Right
I have following this link to create my SQL Server database during installation of
I am adding elements to an XML file during installation using the XmlFile element:
Is the option to create a desktop shortcut during installation only available if the

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.