Solved

Login Script

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

776 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