Unanswered: Executing Visual Basic ActiveX Script by scheduled task
hi i have created an which is running perfectly under a ssis package with the desired output , but i tried executing it as a windows scheduled task and eventhough it runs with no errors it does not do anything.
DTSTaskExecResult_Success means nothing to windows scheduler. If you're running this thing from the command line by way of windows scheduled task, it's probably returning the contents of an empty variable called DTSTaskExecResult_Success. If you run it from inside a sql server package as an actual ActiveX script (not just a command line call), then that variable has a special meaning. If not, then it's just another plain old variable. You may as well say "Main = YayILikeToNameVariables". It would have the same effect.
hi thanks for your reply i am trying to run and execute the following active x script through a scheduled task. I changed the code a little bit, i want to just add the current date in some files. Like i said when i execute this through a ssis package it adds the date to the files but when i run it by schedule tasks eventhough i get no errors no dates are added.
I think you were right to be sniffing around credentials...
What identity did you specify your scheduled task to run under?
If you were in SSIS and ran the package manually, it would have run as you. If you ran it as a scheduled SSIS job, then it would run as the default identity for sql agent (unless you specified something different). Windows scheduled tasks can run as any identity. It could very well be that while YOU have NTFS permissions to the location of interest, the identity that windows scheduler is running under does not.
Try a simple test. Create a script that will do nothing but create a test file. Nothing more. See if you can get that to work.
i added my credentials to the scheduled task and run the package with my id.
i did create a simple script to create a txt file, same thing it did by visual studio/ssis package but by scheduled task run ok but no creation of file.
Can you tell me the steps to make this active x scripts run from scheduled task? maybe i am missing something there