EnterpriseWebLibrary.InstallationSupportUtility.InstallationModel.ExistingInstallationLogic.runInstallutil C# (CSharp) Method

runInstallutil() private method

private runInstallutil ( EnterpriseWebLibrary.Configuration.SystemGeneral.WindowsService service, bool uninstall ) : void
service EnterpriseWebLibrary.Configuration.SystemGeneral.WindowsService
uninstall bool
return void
        private void runInstallutil( WindowsService service, bool uninstall )
        {
            try {
                EwlStatics.RunProgram(
                    EwlStatics.CombinePaths( RuntimeEnvironment.GetRuntimeDirectory(), "installutil" ),
                    ( uninstall ? "/u " : "" ) + "\"" +
                    EwlStatics.CombinePaths( GetWindowsServiceFolderPath( service, true ), service.NamespaceAndAssemblyName + ".exe" /* file extension is required */ ) + "\"",
                    "",
                    true );
            }
            catch( Exception e ) {
                const string message = "Installer tool failed.";
                if( e.Message.Contains( typeof( EmailSendingException ).Name ) )
                    throw new UserCorrectableException( message, e );
                throw new ApplicationException( message, e );
            }
        }