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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:09:05+00:00 2026-05-15T06:09:05+00:00

I have an InstallScript project in IS2010. It has a handful of services that

  • 0

I have an InstallScript project in IS2010. It has a handful of services that get installed. Some are C++ exes and use the “InstallShield Object for NT Services”. Others are Java apps installed as services with Java Service Wrapper through LaunchAppAndWait command line calls. Tomcat is also being installed as a service through a call to its service.bat.

When the installer runs in upgrade mode, the services are reinstalled, and the settings (auto vs. manual startup, restart on fail, log-on account, etc.) are reverted to the defaults.

I would like to save the service settings before the file transfer and then repopulate them afterward, but I haven’t been able to find a good mechanism to do this. How can I save and restore the service settings?

  • 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-15T06:09:06+00:00Added an answer on May 15, 2026 at 6:09 am

    I got this working by reading the service information from the registry in OnUpdateUIBefore, storing it in a global variable, and writing the information back to the registry in OnUpdateUIAfter.

    Code:

    export prototype void LoadServiceSettings();
    function void LoadServiceSettings()
    number i, nResult;
    string sServiceNameArray(11), sRegKey, sTemp;
    BOOL bEntryFound;
    begin
    PopulateServiceNameList(sServiceNameArray);
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    //write service start values to the registry
    for i = 0 to 10
        if (ServiceExistsService(sServiceNameArray(i))) then
            sRegKey = "SYSTEM\\CurrentControlSet\\Services\\" + sServiceNameArray(i);
            nResult = RegDBSetKeyValueEx(sRegKey, "Start", REGDB_NUMBER, sServiceSettings(i), -1);
            if(nResult < 0) then
                MessageBox ("Unable to save service settings: " + sServiceNameArray(i) + ".", SEVERE);
            endif;
        endif;
    endfor;
    RegDBSetDefaultRoot(HKEY_CLASSES_ROOT); //set back to default
    end;
    
    export prototype void SaveServiceSettings();
    function void SaveServiceSettings()
    number i, nType, nSize, nResult;
    string sServiceNameArray(11), sRegKey, sKeyValue;
    begin
    PopulateServiceNameList(sServiceNameArray);
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    for i = 0 to 10
        if (ServiceExistsService(sServiceNameArray(i))) then
            //get service start values from registry
            sRegKey = "SYSTEM\\CurrentControlSet\\Services\\" + sServiceNameArray(i);
            nResult = RegDBGetKeyValueEx(sRegKey, "Start", nType, sKeyValue, nSize);
            if(nResult < 0) then
                MessageBox ("Unable to save service settings: " + sServiceNameArray(i) + ".", SEVERE);
            endif;
            sServiceSettings(i) = sKeyValue;
        endif;
    endfor;
    RegDBSetDefaultRoot(HKEY_CLASSES_ROOT); //set back to default
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited some InstallShield InstallScript projects. I am currently using InstallShield 2009. I
I have an InstallScript project written from scratch in InstallShield 2010. It contains, amongst
I have an InstallShield MSI project. When I pass an MSIHANDLE from an InstallScript
I have an InstallShield (InstallScript) installation, created using IS2009, that's built automatically every night,
I have an InstallShield 2009 'InstallScript MSI' project which shows 2 dialogs which are
I am very new to InstallShield and have inherited a InstallScript project. I have
I have an install project which has a custom action that executes a VBScript
I am using installshield to build a setup project. I have one InstallScript type
I have an InstallShield 2012 InstallScript MSI project and I need to run Oracle
I have a tool which automatically creates InstallShield installers (InstallScript, not MSI), and my

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.