Solved

Login Script

Posted on 2014-04-16
5
358 Views
Last Modified: 2014-04-23
Hello,
Can anyone check the below login script and advise for correction

i tried the below but not working

it says :-the syntax of the command is incorrect

rename c:\windows\system32\drivers\etc\hosts C:\windows\system32\drivers\etc\hosts_original
copy \\data-svr01\share\Hosts c:\windows\system32\drivers\etc\ /Y
0
Comment
Question by:Aditya Arora
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 12

Expert Comment

by:Sandeep
ID: 40004035
rename c:\windows\system32\drivers\etc\hosts C:\windows\system32\drivers\etc\hosts_original

Will not work as it gives syntax error.

replace above by this

cd c:\windows\system32\drivers\etc
rename hosts hosts_original

and then try
0
 
LVL 6

Author Comment

by:Aditya Arora
ID: 40005893
No not working.
0
 
LVL 6

Author Comment

by:Aditya Arora
ID: 40005895
I am tring to block facebook by host file
0
 
LVL 17

Accepted Solution

by:
Mike T earned 500 total points
ID: 40007097
Hi,

You do not need to specify the destination path, i.e.

rename c:\windows\system32\drivers\etc\hosts hosts_original

Mike
0
 
LVL 16

Expert Comment

by:cantoris
ID: 40011483
Mike T has the answer.

Just as an aside, beware that antivirus and security software can monitor your hosts file, so if you're prevented from doing anything to it once you are using the correct syntax, then that's probably why.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question