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

Author Topic: LOGONSCRIPT!  (Read 13065 times)

0 Members and 1 Guest are viewing this topic.

gucciluc

    Topic Starter


    Rookie

    LOGONSCRIPT!
    « on: August 18, 2010, 04:20:53 AM »
    Hey everyone..

    I got a question.

    I have a windows 2003 server running and in my logonscript i want to make an application run 1 time whenever a client logs in..

    Can anyone help me out? I have been looking everywhere..

    Thanks in advance.

    Salmon Trout

    • Guest
    Re: LOGONSCRIPT!
    « Reply #1 on: August 18, 2010, 06:45:02 AM »
    Use Task Scheduler to run the application, and choose as the task trigger "Whenever a user logs in".

    michaewlewis



      Intermediate
    • Thanked: 26
      • Yes
      • Yes
    • Experience: Expert
    • OS: Unknown
    Re: LOGONSCRIPT!
    « Reply #2 on: August 18, 2010, 01:03:14 PM »
    Group Policy is probably what you want to use.
    In group policy editor, look for User Configuration -> Policies -> Windows Settings -> Scripts (Logon/Logoff)
    From there you can input what scripts you want to run.

    gucciluc

      Topic Starter


      Rookie

      Re: LOGONSCRIPT!
      « Reply #3 on: August 19, 2010, 01:27:51 AM »
      thanks for the reply!

      I already have a script.. the problem is, in my script i dont know how to make my server run a specific application to run only 1 time for each user when they log in..


      appreciate any help!

      michaewlewis



        Intermediate
      • Thanked: 26
        • Yes
        • Yes
      • Experience: Expert
      • OS: Unknown
      Re: LOGONSCRIPT!
      « Reply #4 on: August 19, 2010, 10:01:21 AM »
      We assumed you already had the script and just wanted it run automatically. The suggestions from Salmon Trout or myself would do that.

      gucciluc

        Topic Starter


        Rookie

        Re: LOGONSCRIPT!
        « Reply #5 on: August 20, 2010, 01:05:27 AM »
        @ salmon trout:
        there is no task trigger in server 2003 task scheduler.. for what u said (Whenever a user logs in)



        @Michaewlewis
        I can set it in group policy but its gonna be a "loop" my script is going start everytime the client logs in..
        in my script in want a specific command to run only once on each client. i dont want it to run everytime the client logs in..
        I know its a tricky problem, but i still have hope of fixing it lol

        Any help is appreciated people, come on think with me! =(

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: LOGONSCRIPT!
        « Reply #6 on: August 20, 2010, 01:38:50 AM »
        @ salmon trout:
        there is no task trigger in server 2003 task scheduler.. for what u said (Whenever a user logs in)

        In the advanced properties for the task, the "schedule" tab has a Combo box labelled "Schedule Task ". Choose "User logon" in this box.

        This option will also be selected if you select "When I log on" in the scheduled task wizard.
        I was trying to dereference Null Pointers before it was cool.

        gucciluc

          Topic Starter


          Rookie

          Re: LOGONSCRIPT!
          « Reply #7 on: August 20, 2010, 01:56:03 AM »
          I dont think i've got that option..

          here's a print screen:

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: LOGONSCRIPT!
          « Reply #8 on: August 20, 2010, 03:03:16 AM »
          I dont think i've got that option..

          here's a print screen:


          Change it from "Once" to "User Logon".
          I was trying to dereference Null Pointers before it was cool.

          gucciluc

            Topic Starter


            Rookie

            Re: LOGONSCRIPT!
            « Reply #9 on: August 20, 2010, 03:12:59 AM »
            Dont have that option either..
            here's another screenshot:




            again, i dont want that specific application to run on the server! i want it to run on the clients..

            this is so tricky=(

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: LOGONSCRIPT!
            « Reply #10 on: August 20, 2010, 03:18:47 AM »
            again, i dont want that specific application to run on the server! i want it to run on the clients..

            I have a windows 2003 server running and in my logonscript i want to make an application run 1 time whenever a client logs in..

            Looks like we got derailed into Task scheduler which probably won't suite your purpose.

            Let's think here.

            you want to make an application run every time somebody logs in.

            your logon script runs when somebody logs in.

            your logon script can contain instructions and can be changed.

            conclusion: start the program from your logon script. What do you have in the script now? Or do you need one? Here's some info about creating and editing logon scripts:

            http://technet.microsoft.com/en-us/library/cc758918%28WS.10%29.aspx



            I was trying to dereference Null Pointers before it was cool.

            gucciluc

              Topic Starter


              Rookie

              Re: LOGONSCRIPT!
              « Reply #11 on: August 20, 2010, 03:22:53 AM »
              i already have a logonscript..
              im not a programmer so please dont laugh lol

              ill skip all the rest from my logon script and only paste the part i want to make it run once when my client logs in.

              its simply:

              start C:\program files\blablabla\bla.exe
              im sure there are ways to make it so that the above command runs only 1 time..

              but its very hard..

              Thanks very much for ur help, now lets get going, any more idea's?

              BC_Programmer


                Mastermind
              • Typing is no substitute for thinking.
              • Thanked: 1140
                • Yes
                • Yes
                • BC-Programming.com
              • Certifications: List
              • Computer: Specs
              • Experience: Beginner
              • OS: Windows 11
              Re: LOGONSCRIPT!
              « Reply #12 on: August 20, 2010, 04:01:53 AM »
              That should work... the logon script should only execute when somebody is logging on.
              I was trying to dereference Null Pointers before it was cool.

              Salmon Trout

              • Guest
              Re: LOGONSCRIPT!
              « Reply #13 on: August 20, 2010, 04:30:11 AM »
              "C:\program files\blablabla\bla.exe"

              Using Task Scheduler, this is the scheduled task thats runs once when any user logs in. No need for a batch script.


              Sid



                Apprentice
              • Thanked: 8
                • Experience: Experienced
                • OS: Windows XP
                Re: LOGONSCRIPT!
                « Reply #14 on: November 02, 2010, 10:21:41 AM »
                By the sounds of it, you want the action to happen on the first time a user logs in, but not on subsequent logins, is that right?

                If so, you could look at using Group Policy and things like the RunOnce registry key.

                Or you could make a "flag" that the logon script looks for to determine if it has run or not.

                Would you need it to run once per day / week / month etc, or just the once?