Script to disable network connection

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
nbell
Newbie
Posts: 11
Joined: Mon Nov 11, 2002 2:51 pm
Location: China
Contact:

Script to disable network connection

Post by nbell » Sat Jul 21, 2007 12:07 pm

I have some orphanages in a third world country and we have several computers for our children to both browse the internet and to do home work on.

However, they just don't have the will power to limit themselves to a certain amount of time per day playing on the internet.

I would like to write a script that will disable the lan card (network card) at given times during the day and then enable it during other times during the day.

I have tried the program "Internet Scout" and also "iNet Protection" and neither of them work.

I was thinking if I could write a script under my administrator logon that would disable the network card during certain times and enable the network card during other times of the day, that would serve the purpose.

I would sure appreciate it if someone would help me. I just can't figure out how to access the little icon at the bottom right side of the screen (windows XP), right click on it, select disable, etc. etc.

Thanks in advance for your help.
May I live my life so the worth of my life
Far outlasts the Years of my life!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Jul 22, 2007 8:52 pm

1. Can't you set permission times at each user profile on server?

2. Can you use Net STOP? or another NET switch in a scheduled macro?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 23, 2007 7:50 am

Try:

//To disable...
Run>Net Stop "Network Connections"

//To re-enable
Run>Net Start "Network Connections"
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

nbell
Newbie
Posts: 11
Joined: Mon Nov 11, 2002 2:51 pm
Location: China
Contact:

Additional Question

Post by nbell » Mon Jul 23, 2007 10:53 am

Thank to both of you for responding to my question.

In reference to the run> net stop "network connections"....

I'm not really too knowledgeable about these things.. but I dare ask this...

That appears to be a command (the run> command) in the dos environment... and I say this because in looking through the commands in MS I don't find the "run>" command.

So... do I just write it that way in the MS script? If so that is so very easy...

Like I said... I don't know a whole lot about this stuff!

Thank you and waiting to hear back from you!
May I live my life so the worth of my life
Far outlasts the Years of my life!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 23, 2007 11:02 am

Run is an abbreviation for the Run Program command. Net Stop is a command line (DOS if you will) tool. Just copy the code provided. You could make it run hidden with:

Let>RP_WINDOWMODE=0
Run>Net Stop "Network Connections"
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

nbell
Newbie
Posts: 11
Joined: Mon Nov 11, 2002 2:51 pm
Location: China
Contact:

Post by nbell » Mon Jul 23, 2007 11:30 am

Thank you very much!

That works great!

Cheers!
May I live my life so the worth of my life
Far outlasts the Years of my life!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts