I'm a bit new to Advanced Installer and I'm having a big issue with an attached custom action vbscript. I can't get it to access Session.property values and I really need it to read Session.Property("APPDIR")
I'm trying to set up a scheduled task to run one of the installed files.
Here's my code
Code: Select all
const MON = 1
const TUE = 2
const WED = 4
const THU = 8
const FRI = 16
const SAT = 32
const SUN = 64
Dim strStartTime, boolRepeat, intWeekDay, intMonthDay, boolInteract, appDir, strCommand, objWMI, objNewTask
strStartTime = "********000000.000000+000" ' 00:00 GMT
boolRepeat = TRUE
intWeekDay = MON OR TUE OR WED OR THU OR FRI OR SAT OR SUN
intMonthDay = ""
boolInteract = FALSE
Function installTask()
appDir = Session.Property("APPDIR")
strCommand = "java -jar" & appDir & "\irisReport.jar"
set objWMI = GetObject("winmgmts:\\.")
set objNewTask = objWMI.Get("Win32_ScheduledJob")
intRC = objNewTask.Create(strCommand, strstartTime, boolRepeat, intWeekDay, intMonthDay, boolInteract, intJobID)
End Function
FOLLOW US
Get the latest news in Application Packaging