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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:49:42+00:00 2026-05-15T07:49:42+00:00

During install of a windows service (using class MyServiceInstaller : Installer, and ServiceInstaller and

  • 0

During install of a windows service (using class MyServiceInstaller : Installer, and ServiceInstaller and ServiceProcessInstaller) is there a way to force the installer to re-prompt the user for their user account info if they enter it incorrectly.

When the incorrect info is given the install throws an error 1001 message saying incorrect username or password, and then the install fails. I want to re-prompt the user until they get it correct, or they cancel out of the credential entry prompt.

Can I override OnBeforeRollback, and and tell it to retry?

    private ServiceInstaller _ServiceInstaller;
    private ServiceProcessInstaller _ProcessInstaller;

    public GBServiceInstaller()
    {
        InitializeComponent();
        _ServiceInstaller = new ServiceInstaller();
        _ProcessInstaller = new ServiceProcessInstaller();
        _ServiceInstaller.ServiceName = MyService.SERVICENAME;
        _ServiceInstaller.Description = MyService.SERVICEDESCRIPTION;
        _ServiceInstaller.StartType = ServiceStartMode.Manual;
        Installers.Add(_ServiceInstaller);
        Installers.Add(_ProcessInstaller);
  • 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-15T07:49:43+00:00Added an answer on May 15, 2026 at 7:49 am

    I think that when the installer is already about to begin the rollback it’s probably too late. Rather, instead of having the installer fail, test that the username and password are correct before it even installs the actual service.

    There are various ways to do this, one fairly easy way is to use the LogonUser API function as described here, and here is information about how to use PInvoke to call it from C#.

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

Sidebar

Related Questions

I'm installing a Windows Service using the ServiceProcessInstaller and ServiceInstaller classes. I've used the
I'm working on an installer project, during the install process I'd like the user
I'm trying to install my Windows Service app using Visual Studio 2008 Setup and
when i install wcf service hosting on windows service using InstallUtil i get the
I am using Windows Installer XML 3.0 (WIX3) to install some software. Everything works
During an install of PostgreSQL 9.1.2 on my Windows 7 64-bit Home Premium box,
I have developed a Windows service along with a setup project using Visual Studio
I would like to know if there is an easier way to install or
Greetings! I have developed a Windows Service that seems to install just fine most
Sometimes it's necessary to modify Windows registry settings during an application install. I've recently

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.