Solved

Login Script

Posted on 2014-04-16
5
352 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
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 16

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now