I'm struggling to run a scheduled task on win7 machine (which is already created and calls a vbs) from XP machine programatically. I've tried this code for example:
dim objTaskService, objTask, objRootFolder Set objTaskService = CreateObject("Schedule.Service") objTaskService.Connect("win7pc") Set objRootFolder = objTaskService.GetFolder("\") Set objTask = objRootFolder.GetTask("test_task) objTask.Run vbNull
This code works perfect when running it from win7-win7 or win7-XP machine but not XP-win7 machine.
It gives me "ActiveX component can't create object: 'Schedule.Service'" error but can't seem to find anything usefull to solve this error.
Does anyone has an idea why this code doesn't work in XP-win7 or can someone suggest another way how to run scheduled task programatically on windows7 machine when calling it from XP machine?
Tnx for suggestions,