Expertise in Action: Top-Tier Professional I Services at Your Fingertips
Expertise in Action: Top-Tier Professional I Services at Your Fingertips
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:
- [New] 2024 Approved CaptureKing Chronicles The Best Recorders Unveiled
- [New] From Flat to 360 Comparing Google's Cardboard & Samsung's Gear
- [New] In 2024, Navigate to Exciting Windows 11 Gaming World
- [Updated] Celestial Wonders at Your Fingertips - HD Sky Website Guide
- [Updated] In 2024, Unlocking ASMR's Secrets for Optimal Wellness
- 2024 Approved Mastering Visual Storytelling Captioning for TikTok Videos
- Create Your Own Chat Bubbles with These 5 Awesome iOS Sticker Making Apps - Enjoyable and Straightforward Designing!
- Customizing Your Project: The Essential Guide to 'Build' Tabs
- How to Create a Negative-Like Image Look for 2024
- How to Overcome Issues Editing Converts of Word, PPT, or PDF Files
- Optimize Your PC with Easy Setup of Windows Sandbox
- Simplify Your Workflow: Mastering Component & Group Modifications
- The Real Deal on Web Safety: Do Pornographic Websites Harbor Digital Threats?
- Top-Rated iPhone 14 Protective Covers - Comprehensive List
- Title: Expertise in Action: Top-Tier Professional I Services at Your Fingertips
- Author: Anthony
- Created at : 2024-10-06 01:20:32
- Updated at : 2024-10-11 05:51:24
- Link: https://fox-shield.techidaily.com/expertise-in-action-top-tier-professional-i-services-at-your-fingertips/
- License: This work is licensed under CC BY-NC-SA 4.0.