Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Add/Remove Scheduled Task function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Add/Remove Scheduled Task function

    we want to integrate a program - which is ALWAYS starts on Windows login.

    the function "Add/Remove Scheduled Task" have only

    Intervals (Days)

    [in] String that specifies Days between running. If not set or 0, the
    default value is 1.

    ^^

    Dirk Büchel

  2. #2

    Default Re: Add/Remove Scheduled Task function

    Dirk,

    >
    > we want to integrate a program - which is ALWAYS starts on Windows login.
    >

    Please see "Add RegistryRun Entry..." script function. This lets you create
    a Run key that contains the name of a program to run when the computer
    starts.

    Friedrich

  3. #3

    Default Re: Add/Remove Scheduled Task function

    not when the computer starts - but when login - see screen shot - sorry
    is in german

    Dirk Büchel
    Attached Images Attached Images  

  4. #4

    Default Re: Add/Remove Scheduled Task function

    > not when the computer starts - but when login - see screen shot - sorry
    > is in german

    See MSDN.

    Run and RunOnce registry keys cause programs to run each time that a user
    logs on.

    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

    Friedrich

  5. #5

    Default Re: Add/Remove Scheduled Task function

    BTW, another option is the Startup folder. To have the application run at
    startup for every user who logon to the computer, you can place an Shortcut
    in this path instead:

    <AllUserProfile>\Start Menu\Programs\Startup

    But Microsoft recommends to use the Run registry key.

    Friedrich

  6. #6

    Default Re: Add/Remove Scheduled Task function

    Thanks for the information.

    But the problem is - the program require administrator. My information
    said that only a scheduled task can do that.

    Dirk Büchel

  7. #7

    Default Re: Add/Remove Scheduled Task function

    Dirk,

    > Thanks for the information.
    >
    > But the problem is - the program require administrator. My information
    > said that only a scheduled task can do that.

    Ouch! In fact, this is a "no-go" today. Why does your program require
    administrator execution privileges at all? And to make it even worse, why
    does it have to be started elevated behind-the-scenes each time that a user
    logs on! Only very specific system tools need requireAdministrator
    privileges.

    Anyway, this is completely against the rules and against the Windows
    development guidelines. So you have to find your own way to support it.
    What you can do is to try to develop your own DLL that can handle this
    "dirty" trick (but you have to make sure it works on all UAC-aware operating
    systems) and then call the library from your installer and uninstaller.

    Warning: It is NOT NOT NOT recommended to do this! ;-)

    Friedrich

  8. #8

    Default Re: Add/Remove Scheduled Task function

    Let us all with "dirty" tricks working.

    Dirk Büchel

  9. #9

    Default Re: Add/Remove Scheduled Task function

    >
    > Let us all with "dirty" tricks working.
    >

    ;-)

    But perhaps you can avoid the dirty trick!? Make your application
    UAC-compliant and only elevate a process if required. No potential security
    hole for your customers, no potential support nightmare for you :-)

    Friedrich

  10. #10

    Default Re: Add/Remove Scheduled Task function

    Friedrich - But what is this "Run with highest privileges!" - see screen
    shot from scheduled task manager.

    Dirk Büchel
    Attached Images Attached Images  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •