In the recent vodafone advertisement we can hear the line “He is always on facebook”. Facebook team is making so much effort to make people to spend more time on their portal. They analyses people mind where they will waste time very easily and implements it exactly. It was the same case for me before 15 days. Nowadays I am not using it frequently. Accessing hardly on weekly once or twice for ten minutes. To ensure the constraint I have wrote one batch script. No more time wasting on Facebook hereafter.
I am using Windows 7. If you want to enable this in your system just copy the below scripts to your system and schedule it accordingly.
————————————————–
echo |type c:\Windows\System32\drivers\etc\hosts|findstr /v facebook > C:\Windows\System32\drivers\etc\hosts
ping 1.1.1.1 -n 1 -w 60000 > NUL
echo 127.0.0.1 www.facebook.com>> c:\Windows\System32\drivers\etc\hosts
————————————————–
Save it in your C: on any name of your wish with .bat extension. In the given example I have given access to facebook for 10 minutes which is 60000 milli seconds. You can change the timings accordingly to your need.
The first line deletes all the lines which contains the keyword “facebook”. And in the second line the script waits for ten minutes by pinging a non available IP Address. It is the available way of making wait for a batch script. In the third line, I am adding facebook.com to the restriction list by redirecting it to the localhost(system local URL).
There I had an issue that, for the 10 minutes waiting period the command prompt will be the foreground process. It means we need to minimize the window for that 10 minutes which disturbed me. SO I thought of making it as an invisible process(background process). So I have used an existing VB Script(source:Google) to make it invisible for that period.
—————————————————-
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run chr(34) & “C:\goawayfacebook.bat” & Chr(34), 0
Set WshShell = Nothing
—————————————————-
Now schedule the VB script for the time you need using SCHTASKS command or using Task Scheduler.
And forget the problem with facebook!
Talk Me Up is an app designed to give you on demand motivation at the tap of a button – for free! Record and listen to encouraging voice messages to help each other succeed in daily life.