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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:43:03+00:00 2026-05-11T03:43:03+00:00

On install I want to optionally copy some .ini files from SOURCEDIR to TARGETDIR

  • 0

On install I want to optionally copy some .ini files from SOURCEDIR to TARGETDIR which means from the directory the .msi file is located to the destination folder the app is setup to.

I did <CopyFile Id='CopyIniFile' DestinationProperty='INSTALLDIR' SourceProperty='SOURCEDIR' SourceName='Dreem15.ini' Delete='no' /> but it seems it’s not doing anything. The log file is not helping much.

I’ve been successful in doing a much more elaborate scenario with CopyFile and I’m baffeled by this simple one.

Edit: I have these rows in MoveFile table:

|FileKey     |Component     |SourceName          |SourceFolder|DestFolder|Options |CopyIniFile |CoAppLicAndIni|Dreem15.ini         |SOURCEDIR   |INSTALLDIR|0 |MoveDataFile|CoAppLicAndIni|Dreem10_Personal.mdf|DB_DIR10    |INSTALLDIR|0

and the second one is working. DB_DIR10 is searched in registry like this

<Property Id='DB_DIR10'>     <RegistrySearch Id='DbDirSearch10' Type='raw' Root='HKLM' Key='Software\$(var.CompanyName)\$(var.MsdeInstance)' Name='Dreem10_Personal' /> </Property>
  • 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. 2026-05-11T03:43:04+00:00Added an answer on May 11, 2026 at 3:43 am

    According to the windows installer documentation for the sourcedir property, it points to ‘the root directory that contains the source cabinet file or the source file tree of the installation package’.

    So either you were not aware that SourceDir is a predefined windows installer property, or you are trying to copy an unpackaged file from the installation medium that contains the msi. In the latter case it would probably make more sense to install the file like a normal component so that it will be properly uninstalled.

    Edit: I’ve tested the ‘copy from install medium’ scenario and it worked for me. Also, I’ve installed with

    misexec /lvx* install.log /i mymsi.msi 

    and the log did show the file being copied. What does the log say in your case?

    Edit2: While CopyFile worked for me, a better solution is to add an uncompressed medium to your wxs like this:

    <Media Id='2'/> 

    And then adapt the File element for your customizable config file like this:

    <File Source='path\to\default\config.ini' Compressed='no' DiskId='2' /> 

    This will make the installer look for config.ini in the same folder as the msi, combining the advantages of customizability and a clean uninstall.

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

Sidebar

Ask A Question

Stats

  • Questions 74k
  • Answers 74k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Your comments say that the code assumes big-endian. Technically you're… May 11, 2026 at 2:17 pm
  • added an answer The Standard answers all questions in section 9.5 of the… May 11, 2026 at 2:17 pm
  • added an answer Personally, I would call your business logic layer services 'BuildingService'… May 11, 2026 at 2:17 pm

Related Questions

Well this is incredibly frustrating. After being nagged by Rails that I need to
I've been working on a project that accesses the WMI to get information about
I'm writing a piece of software over on github. It's basically a tray icon
I have a WiX project that installs a few EXE files. One is the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.