Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Login Script

Posted on 2014-04-16
5
Medium Priority
?
362 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 18

Accepted Solution

by:
Mike T earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
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 Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
Suggested Courses

610 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