Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

PUSHD/POPD?


  • Please log in to reply
No replies to this topic

#1 Fultonm

Fultonm

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Indiana
  • Local time:02:02 AM

Posted 23 May 2015 - 07:18 AM

I recently encountered an issue where a customer had Malware on the PC.

After the cleanup process their PC was left without the ability to access the Internet.

Even though I could verify DNS Resolution, ICMP access and so forth.

I have seen this a couple of times before and ended up reloading the OS to fix it.

Not for a lack of trying though.

 

This time I found the following link (Thank god for Google):

http://www.selectrealsecurity.com/fix-internet-connection

 

This is apparently linked to this web site according to the bottom of the page which brought me here.

 

The first item resolved the issue but I have questions about the batch file they had me create.

 

I tried all the items in the batch file except the netsh commands which are what probably resolved the issue.

But what I noticed in the batch file was a "pushd" and "popd" command.

 

I googled them and see what they are for but I am curious why they are used in this batch file and if they are necessary or just there because the author prefers to use them.

 

This is the batch file:

@Echo off
pushd\windows\system32\drivers\etc
attrib -h -s -r hosts
echo 127.0.0.1 localhost>HOSTS
attrib +r +h +s hosts
popd
ipconfig /release
ipconfig /renew
ipconfig /flushdns
netsh winsock reset all
netsh int ip reset all
cls
echo Script finished.
pause
del %0
 
Thanks in advance!
 
Michael D Fulton

 



BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users