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

Author Topic: Child Batch!!!  (Read 8100 times)

0 Members and 1 Guest are viewing this topic.

dimman

    Topic Starter


    Rookie

    Child Batch!!!
    « on: May 27, 2009, 10:52:26 AM »
    hi all there!!!

    I need a batch to:
    1. run on start of internet connection
    2. after specific time with a password shut down internet connection
    3. and if u try to reconnect don't let u unless u put the pass


    is all these possible??? pls help the newbeiiiee!!!
    tnhks

    macdad-



      Expert

      Thanked: 40
      Re: Child Batch!!!
      « Reply #1 on: May 27, 2009, 10:53:07 AM »
      Can you rephrase your question?
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      dimman

        Topic Starter


        Rookie

        Re: Child Batch!!!
        « Reply #2 on: May 27, 2009, 10:57:27 AM »
        Can you rephrase your question?
        i need to creat this batch havr u got any idea?

        macdad-



          Expert

          Thanked: 40
          Re: Child Batch!!!
          « Reply #3 on: May 27, 2009, 10:58:01 AM »
          And you want this batch script to do what exactly?
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          dimman

            Topic Starter


            Rookie

            Re: Child Batch!!!
            « Reply #4 on: May 27, 2009, 11:00:32 AM »
            And you want this batch script to do what exactly?
            to manage the time of my child's internet connection, i will put several pass, for ex.
            with 12345>>>1hour
            with 32145>>>2hours
            it's agood idea i think!

            macdad-



              Expert

              Thanked: 40
              Re: Child Batch!!!
              « Reply #5 on: May 27, 2009, 11:11:04 AM »
              Sounds like a good cause, but just to make sure:

              You want to monitor how much time your child uses the internet(or just Internet Explorer or Firefox)?

              And close it if he/she has used it more than so many hours?
              If you dont know DOS, you dont know Windows...

              Thats why Bill Gates created the Windows NT Family.

              dimman

                Topic Starter


                Rookie

                Re: Child Batch!!!
                « Reply #6 on: May 27, 2009, 11:13:34 AM »
                Sounds like a good cause, but just to make sure:

                You want to monitor how much time your child uses the internet(or just Internet Explorer or Firefox)?

                And close it if he/she has used it more than so many hours?
                to shut down internet connection if he over time it!

                macdad-



                  Expert

                  Thanked: 40
                  Re: Child Batch!!!
                  « Reply #7 on: May 27, 2009, 11:17:16 AM »
                  This is not really possible in Batch but there is free software designed for this use:
                  http://restrict-internet-access.vista-files.org/
                  If you dont know DOS, you dont know Windows...

                  Thats why Bill Gates created the Windows NT Family.

                  dimman

                    Topic Starter


                    Rookie

                    Re: Child Batch!!!
                    « Reply #8 on: May 27, 2009, 11:18:18 AM »
                    This is not really possible in Batch but there is free software designed for this use:
                    http://restrict-internet-access.vista-files.org/
                    thanks mac i will check it

                    Helpmeh



                      Guru

                    • Roar.
                    • Thanked: 123
                      • Yes
                      • Yes
                    • Computer: Specs
                    • Experience: Familiar
                    • OS: Windows 8
                    Re: Child Batch!!!
                    « Reply #9 on: May 27, 2009, 02:53:58 PM »
                    You could put a batch file in a startup script...and use the sleep command (downloaded seprately) and ipconfig /release (I think that should do it)...


                    Something like...

                    @echo off
                    set timecount=3600
                    :loop
                    ipconfig /renew
                    sleep %timecount%
                    ipconfig /release
                    echo Password required to continue!
                    set /p pass=
                    if /i %pass%==PASSWORD1 set timecount=3600 & goto loop
                    rem 3600 is 1 hour.
                    if /i %pass%==PASSWORD2 set timecount=7200 & goto loop
                    rem 7200 is 2 hours.
                    echo Password is incorrect!
                    pause > nul
                    exit
                    Where's MagicSpeed?
                    Quote from: 'matt'
                    He's playing a game called IRL. Great graphics, *censored* gameplay.

                    macdad-



                      Expert

                      Thanked: 40
                      Re: Child Batch!!!
                      « Reply #10 on: May 27, 2009, 06:50:18 PM »
                      Or use Helpmeh's script, by the way nice script, never thought of ipconfig  ;)
                      If you dont know DOS, you dont know Windows...

                      Thats why Bill Gates created the Windows NT Family.

                      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: Child Batch!!!
                      « Reply #11 on: May 27, 2009, 07:05:14 PM »
                      one problem with that approach, is that an icon appears saying "limited or no connectivity" clicking that reveals  a dialog with the "repair" button, which renews the IP lease.
                      I was trying to dereference Null Pointers before it was cool.

                      macdad-



                        Expert

                        Thanked: 40
                        Re: Child Batch!!!
                        « Reply #12 on: May 27, 2009, 07:13:48 PM »
                        Could create a for loop to check to see if Firefox or IE was started(Loop every second) but that would include Tasklist.

                        So it seems the software designated for such task would be the only option.
                        If you dont know DOS, you dont know Windows...

                        Thats why Bill Gates created the Windows NT Family.

                        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: Child Batch!!!
                        « Reply #13 on: May 27, 2009, 07:15:11 PM »
                        or actual supervision.
                        I was trying to dereference Null Pointers before it was cool.

                        Carbon Dudeoxide

                        • Global Moderator

                        • Mastermind
                        • Thanked: 169
                          • Yes
                          • Yes
                          • Yes
                        • Certifications: List
                        • Experience: Guru
                        • OS: Mac OS
                        Re: Child Batch!!!
                        « Reply #14 on: May 27, 2009, 09:24:39 PM »
                        Just so you know....

                        The passwords can be easily viewed if you edit the batch file.
                        The batch file can simply be closed to stop the timer.

                        macdad-



                          Expert

                          Thanked: 40
                          Re: Child Batch!!!
                          « Reply #15 on: May 28, 2009, 07:40:44 AM »
                          BC, lets just go with your idea

                          As Carbon usually says about Batch programming:
                          "Why does everyone think that batch can do all these magical things"  ;)
                          If you dont know DOS, you dont know Windows...

                          Thats why Bill Gates created the Windows NT Family.

                          dimman

                            Topic Starter


                            Rookie

                            Re: Child Batch!!!
                            « Reply #16 on: May 28, 2009, 08:22:26 AM »
                            You could put a batch file in a startup script...and use the sleep command (downloaded seprately) and ipconfig /release (I think that should do it)...


                            Something like...

                            @echo off
                            set timecount=3600
                            :loop
                            ipconfig /renew
                            sleep %timecount%
                            ipconfig /release
                            echo Password required to continue!
                            set /p pass=
                            if /i %pass%==PASSWORD1 set timecount=3600 & goto loop
                            rem 3600 is 1 hour.
                            if /i %pass%==PASSWORD2 set timecount=7200 & goto loop
                            rem 7200 is 2 hours.
                            echo Password is incorrect!
                            pause > nul
                            exit
                            thank u man!!! it's very good!!!!!!!!!

                            macdad-



                              Expert

                              Thanked: 40
                              Re: Child Batch!!!
                              « Reply #17 on: May 28, 2009, 08:26:46 AM »
                              This method is easily worked around, once the window pops up for this he/she can simply close it to get all the time he/she wants.


                              If you dont know DOS, you dont know Windows...

                              Thats why Bill Gates created the Windows NT Family.

                              Helpmeh



                                Guru

                              • Roar.
                              • Thanked: 123
                                • Yes
                                • Yes
                              • Computer: Specs
                              • Experience: Familiar
                              • OS: Windows 8
                              Re: Child Batch!!!
                              « Reply #18 on: May 28, 2009, 02:33:51 PM »
                              This method is easily worked around, once the window pops up for this he/she can simply close it to get all the time he/she wants.



                              If the OP converts it to an exe and puts it into ghost mode, the password problem and visibility problem are solved.
                              Where's MagicSpeed?
                              Quote from: 'matt'
                              He's playing a game called IRL. Great graphics, *censored* gameplay.

                              Carbon Dudeoxide

                              • Global Moderator

                              • Mastermind
                              • Thanked: 169
                                • Yes
                                • Yes
                                • Yes
                              • Certifications: List
                              • Experience: Guru
                              • OS: Mac OS
                              Re: Child Batch!!!
                              « Reply #19 on: May 28, 2009, 08:10:20 PM »
                              Task manager --> End process?

                              Helpmeh



                                Guru

                              • Roar.
                              • Thanked: 123
                                • Yes
                                • Yes
                              • Computer: Specs
                              • Experience: Familiar
                              • OS: Windows 8
                              Re: Child Batch!!!
                              « Reply #20 on: May 28, 2009, 08:40:50 PM »
                              Task manager --> End process?
                              depending on how smart the kids are, they may not know...
                              Where's MagicSpeed?
                              Quote from: 'matt'
                              He's playing a game called IRL. Great graphics, *censored* gameplay.

                              Dias de verano

                              • Guest
                              Re: Child Batch!!!
                              « Reply #21 on: May 29, 2009, 12:13:56 AM »
                              depending on how smart the kids are, they may not know...

                              A parent who plans on his kids being dumb & ignorant is a lousy parent in my opinion. And one who deserves to be outsmarted by them. And one who probably will be. Who probably is being right now.

                              « Last Edit: May 29, 2009, 12:26:52 AM by Dias de verano »

                              Carbon Dudeoxide

                              • Global Moderator

                              • Mastermind
                              • Thanked: 169
                                • Yes
                                • Yes
                                • Yes
                              • Certifications: List
                              • Experience: Guru
                              • OS: Mac OS
                              Re: Child Batch!!!
                              « Reply #22 on: May 29, 2009, 12:25:26 AM »
                              depending on how smart the kids are, they may not know...

                              I'm sure they know how to restart the computer.

                              Helpmeh



                                Guru

                              • Roar.
                              • Thanked: 123
                                • Yes
                                • Yes
                              • Computer: Specs
                              • Experience: Familiar
                              • OS: Windows 8
                              Re: Child Batch!!!
                              « Reply #23 on: May 29, 2009, 06:05:22 AM »
                              I'm sure they know how to restart the computer.
                              Ok...

                              How about this then:

                              @echo off
                              set length=3600
                              :loop
                              if exist countup (set /p count=<countup) else (set count=0)
                              if %count% EQU %length% goto pass
                              set /a count+=1
                              sleep 1
                              echo %count% > countup
                              attrib +H countup
                              goto loop
                              :pass
                              ipconfig /release
                              echo Enter password.
                              set /p password=Password^:
                              if %password%==PASSWORD1 set length=3600 & ipconfig /renew & goto loop
                              if %password%==PASSWORD2 set length=7200 & ipconfig /renew & goto loop
                              echo Password Incorrect!
                              pause > nul
                              exit

                              Where's MagicSpeed?
                              Quote from: 'matt'
                              He's playing a game called IRL. Great graphics, *censored* gameplay.

                              macdad-



                                Expert

                                Thanked: 40
                                Re: Child Batch!!!
                                « Reply #24 on: May 29, 2009, 07:59:21 AM »
                                Helpmeh,

                                Thanks for your input and willing to help. But Batch isn't really suited to do this kinda work. Better left to the software designed for this kinda work.
                                If you dont know DOS, you dont know Windows...

                                Thats why Bill Gates created the Windows NT Family.

                                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: Child Batch!!!
                                « Reply #25 on: May 29, 2009, 08:51:20 AM »
                                It's like trying to cut grass with a pair of scissors.
                                I was trying to dereference Null Pointers before it was cool.

                                Helpmeh



                                  Guru

                                • Roar.
                                • Thanked: 123
                                  • Yes
                                  • Yes
                                • Computer: Specs
                                • Experience: Familiar
                                • OS: Windows 8
                                Re: Child Batch!!!
                                « Reply #26 on: May 30, 2009, 06:28:19 AM »
                                Helpmeh,

                                Thanks for your input and willing to help. But Batch isn't really suited to do this kinda work. Better left to the software designed for this kinda work.
                                Yeah. That was basically as close as you can get with batch.
                                Where's MagicSpeed?
                                Quote from: 'matt'
                                He's playing a game called IRL. Great graphics, *censored* gameplay.

                                macdad-



                                  Expert

                                  Thanked: 40
                                  Re: Child Batch!!!
                                  « Reply #27 on: May 31, 2009, 04:16:39 PM »
                                  Thats true, but there are several loop-holes around your method(Not saying its bad)
                                  If you dont know DOS, you dont know Windows...

                                  Thats why Bill Gates created the Windows NT Family.

                                  patio

                                  • Moderator


                                  • Genius
                                  • Maud' Dib
                                  • Thanked: 1769
                                    • Yes
                                  • Experience: Beginner
                                  • OS: Windows 7
                                  Re: Child Batch!!!
                                  « Reply #28 on: May 31, 2009, 05:35:16 PM »
                                  The Topic title defines this pretty well...
                                  " Anyone who goes to a psychiatrist should have his head examined. "

                                  macdad-



                                    Expert

                                    Thanked: 40
                                    Re: Child Batch!!!
                                    « Reply #29 on: May 31, 2009, 05:49:21 PM »
                                    Well said  ;)
                                    If you dont know DOS, you dont know Windows...

                                    Thats why Bill Gates created the Windows NT Family.