Innovative Solutions: Exceptional I Services for Your Success
Innovative Solutions: Exceptional I Services for Your Success
Table of Contents
- Introduction
- Registration
- Using Advanced Installer
- GUI
- Working with Projects
- Installer Project
- Patch Project
- Merge Module Project
- Updates Configuration Project
- Windows Store App Project
- Modification Package Project
- Optional Package Project
- Windows Mobile CAB Projects
- Visual Studio Extension Project
- Software Installer Wizards - Advanced Installer
- Visual Studio integration
- Alternative to AdminStudio/Wise
- Replace Wise
- Migrating from Visual Studio Installer
- Keyboard Shortcuts
- Shell Integration
- Command Line
- Advanced Installer PowerShell Automation Interfaces
* IAdvancedInstaller
* IAdvinstProject
* IProductDetails
* IFolder
* ILaunchConditionsComponent
* IFilesComponent
* IIniFilesComponent
* IShortcut
* ITempFile
* IXmlFile
* IDirectoryMember
* IRegistryComponent
* IInstallParameters
* IBuildComponent
* ITextFileUpdatesComponent
* ITextUpdateFile
* ITextUpdateAppendOrCreate
* ITextUpdateReplace
* IFileAssociations
* IDefaultProgramFA
* IExtensionFA
* IProgIdFA
* IVerbFA
* IEnvironment
* IEnvironmentVariable
* IProductCode
* IUpgradeCode
* IMergeModulesComponent
* IMergeModule
* IDigitalSignature
* ICustomActionsComponent
* ITranslationsComponent
* IDriversComponent
* ISearch
* IServices
* IBaseServiceOperation
* IServiceControlOperation
* IServiceFailureOperation
* IServiceInstallOperation
* IServiceConfigureOperation
* IOrganizationComponent
* IComComponent
* IRemoveFilesComponent
* IRemoveFile
* IUpdatesProject
* IUpdaterComponent
* IPatchProject
* IPropertyComponent
* IProperty
* IPathVariable
* IMsixComponent
* IMsixDependencies
* IMsixDriverDependency
* IMsixDriverConstraint
* IMsixExternalDependency
* IMsixPackageDependency
- Features and Functionality
- Tutorials
- Samples
- How-tos
- FAQs
- Windows Installer
- Deployment Technologies
- IT Pro
- MSIX
- Video Tutorials
- Advanced Installer Blog
- Table of Contents
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
IServices
Declaration
IServices : IDispatch
Overview
This interface is meant to add new service operation or delete/edit the existing ones.
Properties
Array
Methods
NewServiceInstallOperation(IFile aServiceSourceFile) returns IServiceInstallOperation
Creates a new service install operation. Automatically adds a service control operation for the new service.
NewServiceControlOperation(String aServiceName) returns IServiceControlOperation
Creates a new service control operation.
NewServiceConfigureOperation(String aServiceName) returns IServiceConfigureOperation
Creates new service configure operation.
NewServiceFailureOperation(String aServiceName) returns IServiceFailureOperation
Creates new service configure operation.
DeleteServiceOperation(IBaseServiceOperation aOperation)
Deletes a service operation.
Example
$advinst = new-object -com AdvancedInstaller
$prj = $advinst.LoadProject(“D:\services.aip”)
Add new service install operation
$serviceInstall = $prj.Services.ServiceOperations | where {$.Name -eq “MyService” -and $.OperationType -eq “Service Install”}[0]
if($serviceInstall -eq $null)
$serviceExe = $prj.FilesComponent.Files | where {$_.Name -eq “MyService.exe”}[0]
if($serviceExe -eq $null)
$serviceExe = $prj.FilesComponent.AddFileS("appdir", "D:\my_app_folder\MyService.exe")
$serviceInstall = $prj.Services.NewServiceInstallOperation($serviceExe)
$serviceInstall.Name = “MyService”
$serviceInstall.AllowDesktopInteraction = $true
$serviceInstall.Arguments = “/Run”
$serviceInstall.StartType = “OnDemand”
$serviceConfig = $prj.Services.ServiceOperations | where {$.Name -eq “MySecondService” -and $.OperationType -eq “Service Configuration”}[0]
if($serviceConfig -eq $null)
$serviceConfig = $prj.Services.NewServiceConfigureOperation(“MySecondService”)
$serviceConfig.ConfigureOnInstall = $true
$serviceConfig.ConfigureOnReinstall = $true
$serviceConfig.ConfigureOnUninstall = $false
$serviceConfig.SettingToChange = “TimeToRunFailureActions”
$serviceFail = $prj.Services.ServiceOperations | where {$.Name -eq “MySecondService” -and $.OperationType -eq “Service Failure”}[0]
if($serviceFail -eq $null)
$serviceFail = $prj.Services.NewServiceFailureOperation(“MySecondService”)
$serviceFail.ConfigureOnInstall = $true
$serviceFail.ConfigureOnReinstall = $true
$serviceFail.ConfigureOnUninstall = $false
$serviceFail.DaysBeforeResetFailureCount = 1
$serviceFail.RebootMessage = “”
$failureAction = $serviceFail.FailureActions | where {$_.Action -eq “RunProgram”}[0]
if($failureAction -eq $null)
$failureAction = $serviceFail.NewFailureAction(“RunProgram”, 1)
$serviceFail.RunProgram = “MySecondService.exe”
$serviceFail.RunProgramArguments = ‘/log “MySecondService has stopped.”‘
$prj.Save()
Copy
See also
Topics
- IBaseServiceOperation
Interface for editing basic service operation properties. - IServiceControlOperation
Interface for editing service control operation properties. - IServiceFailureOperation
Interface for editing service failure operation properties. - IServiceInstallOperation
Interface for editing service installation operation properties. - IServiceConfigureOperation
Interface for editing service configure operation properties.
Did you find this page useful?
Please give it a rating:
Thanks!
Report a problem on this page
Information is incorrect or missing
Information is unclear or confusing
Something else
Can you tell us what’s wrong?
Send message
Also read:
- [Updated] In 2024, True-to-Life Shade Tweaker
- [Updated] Smooth 'Reels' Enhancing Android Video Clarity for 2024
- [Updated] The Evolution A Deep Dive Into LG's OLED Monitors UD88-W
- 1. Transfer Your Tunes: Top Techniques for Syncing iPhone Music with Your Computer
- 2020'S Ultimate Guide: Effortless Removal of PDF Watermarks and Securing Your Documents
- 2024 Approved JokesterJigsaw Toolkit
- 2024 Approved Sky's Eye Insights Overview
- Customizing Your Car's Driving Options
- Discover the Ultimate Guide to Choosing a DVD Ripper Software - Find Your Perfect Match Today!
- Expert Recommendations for 8-Windows Audio Apps
- Exploring Success Routes with Our Comprehensive Project Paths Tab Guide
- Guide: Eradicate All AdChoices Intrusive Windows for a Cleaner Browsing Experience
- In 2024, How to Detect and Remove Spyware on Poco C55? | Dr.fone
- Mastering the Art of iOS 11 Screenshots: A Step-by-Step Tutorial on Inbuilt Annotation Tools
- Modify Conditional Display Settings: Guide to Editing the Condition Window
- Title: Innovative Solutions: Exceptional I Services for Your Success
- Author: Stephen
- Created at : 2024-10-07 18:45:02
- Updated at : 2024-10-11 00:34:05
- Link: https://fox-place.techidaily.com/innovative-solutions-exceptional-i-services-for-your-success/
- License: This work is licensed under CC BY-NC-SA 4.0.