|
|||||||
| Windows XP / 2000 / NT / 9x Forum Discussion for Windows operating systems from XP right back to the very beginnings! |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Space Monocerotis
Join Date: May 2004
Location: Aust
Posts: 1,401
Rep Power: 0 ![]() |
flush your cache.
just would like to known whats the easyest way to flush your cache. As i dont known.
|
|
|
|
|
|
#2 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
Start ->Run ->CMD
type in or copy/paste this below command line.. ipconfig /flushdns Code:
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\your windows login name>ipconfig /flushdns Windows IP Configuration Successfully flushed the DNS Resolver Cache. C:\Documents and Settings\your windows login name>exit |
|
|
|
|
|
|
|
Space Monocerotis
Join Date: May 2004
Location: Aust
Posts: 1,401
Rep Power: 0 ![]() |
thxs go it
|
|
|
|
|
|
#4 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
Np.
|
|
|
|
|
|
#5 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
Ipconfig.exe :
Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays the IP address, subnet mask, and default gateway for all adapters. Parameters : IPconfig.exe with the /flushdns Switch : Flushes and resets the contents of the DNS client resolver cache. During DNS troubleshooting, you can use this procedure to discard negative cache entries from the cache, as well as any other entries that have been added dynamically. IPconfig.exe with the /displaydns Switch : Displays the contents of the DNS client resolver cache, which includes both entries preloaded from the local Hosts file and any recently obtained resource records for name queries resolved by the computer. The DNS Client service uses this information to resolve frequently queried names quickly, before querying its configured DNS servers. -- Run these commands with batch files.. flushdns.cmd Code:
@echo off color 1E title "ipconfig /flushdns" ::path = c:\windows\system32 cd /d "c:\windows\system32" echo. echo Press Enter/Return key to flush the DNS resolver cache, echo and reloads the entries from Hosts file . . . set /p = cls color 2F ipconfig /flushdns echo. echo. echo Press Enter/Return key to quit . . . set /p = cls exit Code:
@echo off color FC title "ipconfig /displaydns" ::path = c:\windows\system32 cd /d "c:\windows\system32" ipconfig /displaydns echo. echo Press Enter/Return key to quit . . . set /p = exit for Windows 2000 users read this.. Dr Watson Error Message in Services.exe When You Use IPconfig.exe with the /displaydns Switch http://support.microsoft.com/kb/262637/EN-US/ Last edited by Ctrl-Alt-Del; Feb 1, 2005 at 05:37 AM. |
|
|
|
|
|
#6 |
|
Delete Me
Join Date: Mar 2004
Posts: 14,648
Rep Power: 0 ![]() ![]() ![]() ![]() ![]() ![]() |
very nice c-a-d
![]() mind if I ask what the color commands in there are for?(I've never used those in a .cmd file before) |
|
|
|
|
|
#7 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
Command Color is use to change the text and background colors in a console window,
it's still working.. |
|
|
|
|
|
#8 |
|
Delete Me
Join Date: Mar 2004
Posts: 14,648
Rep Power: 0 ![]() ![]() ![]() ![]() ![]() ![]() |
hmm....that's cool..may hafta fiddle with that...it just uses hex code, right?
|
|
|
|
|
|
#9 | |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
yep, here's the info about color attributes.. save your time
![]() Quote:
|
|
|
|
|
|
|
#10 |
|
Delete Me
Join Date: Mar 2004
Posts: 14,648
Rep Power: 0 ![]() ![]() ![]() ![]() ![]() ![]() |
thanks
|
|
|
|
|
|
#11 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
Np.
|
|
|
|
|
|
#12 |
|
DriverHeaven Junior Member
Join Date: Oct 2004
Location: Herts UK
Posts: 56
Rep Power: 0 ![]() |
what benifits does doing this have? never done it before
__________________
[color=blue][/color]
|
|
|
|
|
|
#13 |
|
DriverHeaven Senior Member
Join Date: Dec 2004
Location: Inside DriverHeaven
Posts: 856
Rep Power: 0 ![]() ![]() |
Windows 2000, XP and 2003 come with a DNS client, which caches all the DNS queries made from you. In short, a DNS query is the attempt to find a site's IP address from its hostname. Caching these queries makes your browsing experience faster.
Sometimes, it helps flushing that cache as the DNS client service caches failed DNS queries too, which prevents you from viewing some websites until you refresh the cache or restart your PC |
|
|
|
|
|
#14 |
|
DriverHeaven Junior Member
Join Date: Oct 2004
Location: Herts UK
Posts: 56
Rep Power: 0 ![]() |
cheers, i did it not knowing what it would do and i did notice it was a bit quicker!
__________________
[color=blue][/color]
|
|
|
|
|
|
#15 | |
|
HardwareHeaven News Mod
|
Quote:
|
|
|
|
|
|
|
#16 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
thanks for having me here. MIG-31.
|
|
|
|
|
|
#17 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
Changes made to update the above batch files.
also like to add these two below... there're two VBScripts EVENTQUERY.vbs and PAGEFILECONFIG.vbs which're located in \WINDOWS\system32 of WinXP. since these scripts should be executed from the Command Prompt using CScript.exe, i just wrote these two batch files to run the scripts just for displaying a brief information without having to do several clicks in explorer. and i think it may be useful to others. note-- these batch files are tested on Win XP SP2. and as usual, use these batch files at your own risk. EventQuery.cmd -------------- Code:
@echo off color 1F goto start EventQuery.cmd --Lists the Warning and the Error events in 'Application' and 'System' log. ------------------------------------------------------------------------------ Listing the events in 'application' log of host 'xxxxxxxxxxxx' ------------------------------------------------------------------------------ Type Event Date Time Source ComputerName ------------- ------ ------------------------ ----------------- -------------- warning xxxx x/xx/xxxx xx:xx:xx PM xxxxxx xxxxxxxxxxxx error xxxx x/xx/xxxx xx:xx:xx AM xxxxxx xxxxxxxxxxxx ------------------------------------------------------------------------------ Listing the events in 'system' log of host 'xxxxxxxxxxxx' ------------------------------------------------------------------------------ Type Event Date Time Source ComputerName ------------- ------ ------------------------ ----------------- -------------- warning xxxx x/xx/xxxx xx:xx:xx PM xxxxxx xxxxxxxxxxxx error xxxx x/xx/xxxx xx:xx:xx AM xxxxxx xxxxxxxxxxxx :start title EventQuery.cmd -by Panging echo. cd /d "c:\windows\system32" cscript.exe eventquery.vbs /fi "type eq error OR type eq warning" /l application /l system echo. echo Press Enter key to quit . . . set /p = -------------- Code:
@echo off goto start PagefileDisplay.cmd --Displays this system's paging file Virtual Memory settings. ------------------------------------------------------- Displays a system's paging file Virtual Memory settings Host Name: ComputerName Drive/Volume: X: Volume Label: XXXXX Location\File Name: X:\pagefile.sys Initial Size: XX MB Maximum Size: XX MB Current Size: XX MB Total Free Space: XXXX MB Host Name: ComputerName Total (All Drives): Minimum Size: X MB Total (All Drives): Recommended Size: XXX MB Total (All Drives): Currently Allocated: XXXX MB ------------------------------------------------------- :start title PagefileDisplay.cmd -by Panging. echo. cd /d "c:\windows\system32" cscript pagefileconfig.vbs /query echo. echo Press Enter key to quit . . . set /p = |
|
|
|
|
|
#18 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 71 ![]() ![]() ![]() ![]() |
a new batch file added.
the Automatic Updates service is needed before going to the WU web site. and since i use a dial-up i've disabled this service and then turn it on just before i go to the WU. this batch file will give an easy way for a lazy man like me to turn the service on and off.. AutoUpdateService_Enable-Disable.cmd Code:
@echo off cls ::color 17 goto start ================================= AutoUpdateService_Enable-Disable.cmd: - Enables/Disables the Automatic Updates Service. ================================= Automatic Updates Service - Description: - Enables the download and installation of Windows updates. If this service is disabled, this computer will not be able to use the Automatic Updates feature or the Windows Update Web site. ================================= :start title AutoUpdateService_Enable-Disable.cmd -by Panging echo. :Loop echo 1. To Enable and Start Automatic Updates Service. echo 2. To Disable and Stop Automatic Updates Service. echo 3. Exit this program. echo. echo. set Choice= set /P Choice=Type in the number and press Enter key: if not '%Choice%'=='' set Choice=%Choice:~0,1% echo. if /I '%Choice%'=='1' goto Enable if /I '%Choice%'=='2' goto Disable if /I '%Choice%'=='3' goto End echo "%Choice%" is not valid. Please try again. echo. goto Loop :Enable ::color 2F echo Enabling and Starting Automatic Updates Service . . . echo ----------------------------------------------------- echo. sc config wuauserv start= auto sc start wuauserv goto Selection :Disable ::color 4F echo Disabling and Stopping Automatic Updates Service . . . echo ------------------------------------------------------ echo. sc config wuauserv start= disabled sc stop wuauserv goto Selection :Selection ::color 17 echo. echo Press Enter key to go back to main menu . . . echo --------------------------------------------- set /p = cls goto Loop :End ::end of batch program.
Last edited by Ctrl-Alt-Del; Feb 23, 2005 at 08:18 AM. |
|
|
|
![]() |
| Thread Tools | |
|
|