|
Answer» So its summer and my daughter wants to use her computer a lot, but I dont want her brain turning to mush.
She forgot a good portion of her multiplication tables and so I wrote up a quick C++ program that randomizes with a seed for 0 thru 12 for 2 places and asks for her to solve the problems any combination of 0x0 thru 12x12. In the program I have two counters that show how many correct and incorrect, and I am going to also add to the source to write to text file the ones that she gets wrong so that I know which ones to work with her on remembering.
So after I created this last night I was thinking, I should add this multiply12.exe program to the startup of her Windows XP computer and have her have to get 30 answers correct before she can surf the web.
Now there are a number of ways to go about disabling/enabling internet, however I was curious as to which method is best with C++ and Windows XP Pro SP3 OS.
Her computer is a Pentium 4 3Ghz with 1GB RAM and GeForce 6200 8X AGP video card with 256MB RAM and 40GB IDE HDD with single DVD-Rom, and Linksys USB Wireless G NIC, and the beige tower has been painted hot pink and is loaded with hello kittie stickers all over it which was her favorite theme 2 years ago when I gave it to her at age 6.
Methods I was considering were:
#1 - Swapping HOSTS file so that when the system boots it is on a HOSTS file that redirects everything to 127.0.0.1 , but then when she answers 30 problems correctly, the HOSTS file is swapped back with one that allows her to go out onto the web to PBSkids, Nick.com etc.
#2 - Disabling the Linksys USB WIFI adapter until 30 problems are answered correctly, and then enable the USB WIFI adapter.
# 3 - Changing the Gateway to something other than the gateway so it never gets outbound until 30 are answered correctly and then switch the gateway back to the correct gateway IP so that she can go outbound.
# 4 - Set a Service to Manual in computer config with it always booting to Disabled and when 30 are answered correctly issue a NET START servicename via system(" "); instruction within C++.
---------------------------------------------------
Concerns with these listed:
Method #1 - Windows Security will likely protect the HOSTS file from being swapped by a C++ program instruction.
Method #2 - Have never enabled/disabled USB devices via command line. I am sure it should be able to be done, but would need someone to show me how.
Method #3 - While changing IP addresses are easy within the windows GUI, I have never done this from command line, and would need INFO on how to do this.
Method #4 - This is probably the easiest method, but would require passing a NET START servicename via system(" "); instruction within C++ to run the command to enable the service. *Havent decided yet which service is best to enable/disable, but was thinking maybe the Linksys Service that is associate with the USB wifi adapter possibly which would be the same as method#2, however maybe there is a better service to have set to disable at boot and enable via the C++ program to allow internet access. The system(" "); method while it works, I have been told is a poor method to be used to pass commands out to command prompt, and maybe there is a better way that I am unaware of.
---------------------------------------------------
Open for suggestions on other methods or examples of ways to go about doing this?
The good thing is that my daughter hasnt complained yet. I just want her to exercise her brain before she surfs web and earn the internet access daily by going through this process. Later on I was thinking of building on from this as her skills in school become more complex etc.
*** The only thing though is at some point she might get sneaky and just use the calculator built into windows or one in a desk drawer, but until she figures that out, I plan on using this reward system in which she solves the problems and is rewarded with computer internet access.
Have also considered adding a timer that limited the time she had on the computer, but thats a whole different project, and I have considered just putting a router on a electric timer that is commonly used for turing lamps on/off when not home etc to enable wifi for SAY just 2 hours a day for her computer between 6pm and 8pm for example etc.
I have been programming using Bloodshed C++ IDE for console programming, but also have the 2010 and 2012 express for visual C++. With console programming being far faster than nice looking windows programming, I GENERALLY go the path of least resistance with console programming for projects like this. I also have Visual C++ 6.0 if I need to use features that are missing from Bloodshed C++ as well as the Express editions of C++. Personally I haven't had to use VC++6 in a long time.Check documentation for your router. It should have some way to disable a user for a short time. It then becomes just a script your send to the router. Np need for a compiled program. Unless you just want to. Thanks for input on this Geek-9pm ... I will have to check into the router I have that is wireless to see if it has a feature to do this. All I know is that its a DLink N150 that I bought about 2 years ago for around $20 through a CLOSEOUT deal at newegg. I set it up secure, but haven't checked into the advanced features portion that might have this ability.
|