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

  • Home
  • SEARCH
  • 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 8349317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:57:33+00:00 2026-06-09T07:57:33+00:00

I have created an MSI installer with WiX. I am specifically targeting Windows XP

  • 0

I have created an MSI installer with WiX.
I am specifically targeting Windows XP SP3+
It runs a custom action on completion of the installation to register the application as a service via NSSM.exe
The batch file when run from a command line does what it is written to do, but when run as part of the installer it completes the installation I see the command prompt open and the script run, but the application is not registered.

    <CustomAction Id="installLoft"
              Directory="ModulesFolder"
              ExeCommand="[ModulesFolder]winInstall.cmd"
              Execute="deferred"
              Return="check"
              HideTarget="no"
              Impersonate="no" />
<InstallExecuteSequence>
  <Custom Action="installLoft" Before="InstallFinalize"><![CDATA[ (NOT Installed) AND (NOT REMOVE) ]]></Custom>
</InstallExecuteSequence>

The batch script contents is:

@ECHO OFF
SET PATH=%PATH%;%APPDATA%\app1\
IF "%ProgramFiles(x86)%"=="" (
    set PATH=%PATH%;%ProgramFiles%\app1\
) ELSE (
    set PATH=%PATH%;%ProgramFiles(x86)%\app1\
)
"app1\modules\bin\nssm.exe" install my_service_name_app1 app1.cmd -g

So, app1 is a script that needs to be run as a service, hence the need for NSSM.exe
All the components/files are installed in the right places.

Are there some Win XP caveats that I am missing? Running the batch manually with the same user that ran the installer, the service is registered.

Thanks for your help.

  • 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-09T07:57:34+00:00Added an answer on June 9, 2026 at 7:57 am

    I have figured it out.
    What I found is that in Win XP when the service is registered, it is registered under Local System (or SYSTEM) user. But the SYSTEM user does not have an APPDATA environment variable set. What was happening, is that my script would try to start up the service and would silently fail because APPDATA was not defined.

    I declared/defined a custom MYAPPDATA system level environment variable and now when the installer completes – after a reboot – the service is up and running.

    Hope this helps someone else relying on standard Environment variables.

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

Sidebar

Related Questions

Using WiX (Windows Installer XML) I have created an MSI installer which installs Word
I have created a MSI Installer via VS2010 Windows Installer . I am able
I have created a windows installer for a windows forms app as an MSI.
I have a MSI installer custom action which calls Process.Start() to run a batch
We have a product installer created with Wix, containing a program package ( V1
We currently have an MSI that is created with WiX 3.5. The application is
I've created an MSI using WiX. I'm trying to register .NET components for COM
I have created a standard MSI installer for P&D of my application which is
I have created a Simple Windows Application, and its Installer too ( Setup project
I've created a Wix (3.0) custom action written in .NET. Fine. The problem is

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.