Option Explicit
Sub Main
Dim intReturn As Integer
Dim varExecutable As Variant
Dim varDisplayName As Variant
Dim varUsername As Variant
Dim varPassword As Variant
Dim intErrorType As Integer
Dim intServiceType As Integer
Dim intRunType As Integer
Dim intInteractive As Integer
varExecutable = "c:\Program Files\Program\program.exe"
varDisplayName = "MyProgram"
varUsername = "username"
varPassword = "password"
intErrorType = 1
intServiceType = 1
intRunType = 0
intInteractive = 0
intReturn = Action2.InstallService (varExecutable, varDisplayName, varUsername, varPassword, intErrorType, intServiceType, intRunType, intInteractive)
If intReturn = 0 Then
MsgBox "Failure"
MsgBox( Action2.GetLastError )
ElseIf intReturn = 1 Then
MsgBox "Success"
End If
End Sub