Announcement

Collapse
No announcement yet.

Task Scheduler wrapper functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Task Scheduler wrapper functions

    i have posted wrapper functions and examples to use the task scheduler.

    wrappers
    http://www.powerbasic.com/support/pb...ad.php?t=24506

    examples
    http://www.powerbasic.com/support/pb...ad.php?t=24507
    http://www.powerbasic.com/support/pb...ad.php?t=24508
    http://www.powerbasic.com/support/pb...ad.php?t=24509


    if you have any comments use this thread to post them. don't post in the
    source code forum.



    ------------------
    Forum: http://www.jose.it-berater.org/smfforum/index.php

  • #2
    I will definately be having a look at these

    THANK YOU !!!!!

    ------------------
    Paul Dwyer
    Network Engineer
    Aussie in Tokyo

    Comment


    • #3
      What about system account (NT AUTHORITY\SYSTEM)?

      Hi.
      Much thanks to Jose Roca in 2005.
      I use his functions, but have some problems with the system account.
      In the TB_MsTsk.inc source code, there are strings:
      Code:
      FUNCTION ITask_SetAccountInformation (BYVAL pthis AS DWORD PTR, _ ''
      BYVAL strAccountName AS STRING, BYVAL strPassword AS STRING) AS LONG
      LOCAL HRESULT AS LONG
      strAccountName = UCODE$(strAccountName)
      IF strPassword = "" THEN
         CALL DWORD @@pthis[30] USING Proto_ITask_SetAccountInformation _
               (pthis, STRPTR(strAccountName), %NULL) TO HRESULT
      ELSE
         strPassword = UCODE$(strPassword)
         CALL DWORD @@pthis[30] USING _
              Proto_ITask_SetAccountInformation  (pthis, _
              STRPTR(strAccountName), STRPTR(strPassword)) TO HRESULT
      END IF
      FUNCTION = HRESULT
      END FUNCTION
      When I want to create the task from the System account (NT AUTHORITY\SYSTEM) by hands, I usually stay empty password and confirm. What must I do through that functions? Several experiments shows one of two mistakes:
      - 0x80041314 (during the saving the task to disk); or
      - 0x80070005 (access denied) during the task' execution.
      I'm on XP SP2. What's wrong?
      Maybe I must use the empty string and delete "IF" construction? I tried - no effects.
      Maybe I must enter Administrator's password? I tried - no effects.
      Maybe I must make Administrator's password empty? Tried - no effects...
      Alex
      Last edited by Alex Trenty; 13 Jun 2011, 03:44 PM.

      Comment


      • #4
        See http://support.microsoft.com/kb/904423/en-us

        You may receive an “0x80070005: Access is denied" error message when you create a scheduled task on a Windows XP-based computer after you install security update 841873
        Forum: http://www.jose.it-berater.org/smfforum/index.php

        Comment

        Working...
        X