Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: IIS 7.5  (Read 6919 times)

0 Members and 1 Guest are viewing this topic.

Spoiler

    Topic Starter


    Specialist

    Thanked: 50
  • Experience: Beginner
  • OS: Windows XP
IIS 7.5
« on: July 26, 2010, 12:59:38 PM »
Hi All,
Does anyone know of a way to triger a job when a FTP user logs off? I want to move a file to a new place after the user has up loaded it.

Thanks
Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer

killerb255



    Adviser
  • Thanked: 35
    • Experience: Expert
    • OS: Windows 7
    Re: IIS 7.5
    « Reply #1 on: July 28, 2010, 02:30:59 PM »
    If you're running Windows Server 2008 (R1 or R2), you can create a scheduled task based on events.

    You'll have to do two things (I'm recalling this off the top of my head, so it may not be exact):

    I.  Set the server to audit logon events

    1) Start -> Run -> type in gpedit.msc and click OK.
    2) Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Audit Policies
    3) Enable "Audit Logon Events" and, I think "Audit Account Logon Events."  Click OK and close out of the Group Policy Object Editor.
    4) Start -> Run -> type in cmd and click OK.
    5) Type in gpupdate in the command prompt and click OK.


    II. Create an appropriate scheduled task

    1) Manually log into your FTP server and see if something appears in the Event Viewer under "Security."  If it does, make a note of the number and source.  Now log off.  See if something else appears.  The source should be the same, but the number should be different.  You'll need these for your Scheduled Task.
    2) Start -> Administrative Tools -> Task Scheduler.
    3) Create Task (not Basic task).
    4) Check the check boxes that allow it to run whether or not a user is logged in and run with highest privileges.
    5) Under the "Triggers" tab, click "New."
    6) Set the trigger to fire "On an event."  Select the source and number for the logoff event that you noted during Step 1 above. 
    7) Go to the "Action" tab and select "Run a program."  Select the script you want to run.
    8) Click OK.  Type in the appropriate user name/password to the server (one that has rights to run the task). 
    9) Test it out by logging in and out via FTP.  See if the scheduled task fires. 

    If you wish to have me clarify some steps, let me know.  I'll check a Server 2008 machine and get the exact verbiage if necessary.
    Quote from: talontromper
    Part of the problem is most people don't generally deal with computer problems. So for most they think that close enough is good enough.