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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:16:45+00:00 2026-05-15T02:16:45+00:00

I am trying to create an MSI package that uses the AppCmd application to

  • 0

I am trying to create an MSI package that uses the AppCmd application to configure IIS7. It only has to execute some commands that call AppCmd. Some commands need to be called when installing, other commands need to be called when uninstalling.

Here is what I have now:

I have a property that points to AppCmd:

<Property Id="APPCMD" Value="C:\Windows\system32\inetsrv\appcmd.exe" />

I have my custom actions:

<CustomAction Id="UnlockHandlerSection" Return="check" Property="APPCMD" ExeCommand="unlock config /section:system.webServer/handlers" />

I have Custom elements that call the actions:

<InstallExecuteSequence>
    <Custom Action="UnlockHandlerSection" After="InstallFiles">NOT Installed AND NOT PATCH</Custom>
<InstallExecuteSequence>

The problem with this is is that the commands are not called when I try to install the resulting MSI package. If I log the installation, the log itself doesn’t have a lot of information in it. I don’t wanna post the whole thing, but it ends with this:

MSI (c) (50:34) [12:35:47:703]: Product: Server Configuration 1.0.0 -- Installation failed.
MSI (c) (50:34) [12:35:47:703]: Windows Installer installed the product. Product Name: Server Configuration 1.0.0. Product Version: 1.0.0. Product Language: 1033. Installation success or error status: 1603.

Also, just before my APPCMD property is initialized, this is what is printed (are the return values here correct?):

Action ended 12:35:47: ExecuteAction. Return value 3.
Action ended 12:35:47: INSTALL. Return value 3.
Property(C): APPCMD = C:\Windows\system32\inetsrv\appcmd.exe

Could anyone please advise me on what I am doing wrong? Thank you!

  • 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-15T02:16:46+00:00Added an answer on May 15, 2026 at 2:16 am

    The solution was to add an empty component:

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Component Id="EmptyComponent" Guid="*" />
    </Directory>
    

    The next step was to include that empty component in a feature:

    <Feature Id="Feature" Title="Feature" Level="1">
        <ComponentRef Id="EmptyComponent" />
    </Feature>
    

    After adding these two bits, the commands are called correctly.

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

Sidebar

Related Questions

No related questions found

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.