MS DOS Custom Command Question
General support for all versions of Windows.

Moderators: Forum Experts, Management

MS DOS Custom Command Question

Postby Vanilla on Mon Oct 31, 2011 5:04 pm

Hi all, I hope I'm posting in the correct forum - I just registered on here because I'm looking for the answer to a really specific question on MS DOS that I haven't been able to find anywhere online, figured you guys might be able to help.

The trick is that I need the command line:

Code: Select all
display [IP address here] DNS


to run the equivalent of a displaydns command

I also need the line:

Code: Select all
clear [IP address here] DNS


to clear the DNS cache, essentially the same as a flushdns command.

I know that this is kind of a weird request, but I was curious if it was possible. Anyone know if that's doable or how to do it?

EDIT: I worded the initial request wrong, so I edited it on here in hopes of clarifying it a bit.
Last edited by Vanilla on Mon Oct 31, 2011 7:39 pm, edited 2 times in total.
Vanilla
PRO New Member
PRO New Member
 
Posts: 2
Joined: Mon Oct 31, 2011 5:00 pm

Re: MS DOS Custom Command Question

Postby yeshuas on Mon Oct 31, 2011 5:51 pm

I believe this should work for you

The command ipconfig /flushdns clears the DNS cache. All records up to this point in time are removed from the cache.


C:\Users\Martin>ipconfig /flushdns



To check to see if it did would be this

C:\Users\Martin>ipconfig /displaydns

Of couse substituting as needed the correct drive letter and user name
Game Over!!!!!!!!
Image
P5Q Deluxe MB
Windows 7 X86; Windows 7 X64
Q6600 Core 2 Quad w/CNPS9500-LED cooler
4GB Corsair XMS2-PC6400C5 DHX w/heat spreaders
eVGA GeForce GTX 260 216 processing cores 896MB GDDR3
Thermaltake 750W ToughPower modular cabled PS
2-750Harddrive Raid 0
Lian-Li V1000B Plus Case
User avatar
yeshuas
Software Development
 
Posts: 3842
Joined: Wed Jan 17, 2007 3:29 pm
Location: Chicago, IL
Real Name: Daniel Schmidt

Re: MS DOS Custom Command Question

Postby Vanilla on Mon Oct 31, 2011 7:35 pm

What I need is to create a custom command line so that the line "display [IP address here] DNS" shows the DNS cache and so that the command line "clear [IP address here] DNS" clears the DNS cache. I basically want the line:

Code: Select all
clear [IP address here] DNS


to do the equivalent of a flushdns command for the IP address being designated - all of this stuff will be internal, so it can operate the same way as a standard IP config for the most part. Does this make sense? I know it's a convoluted and kind of strange way of doing this, but it's a pretty specific task I'm trying to do.
Vanilla
PRO New Member
PRO New Member
 
Posts: 2
Joined: Mon Oct 31, 2011 5:00 pm

Re: MS DOS Custom Command Question

Postby JabbaPapa on Tue Nov 01, 2011 7:15 am

1) create the executables (batch file is probably all you need here) that will do what you want

2) test

3) rename them into the command name you want (I wouldn't use the names of commands you're "replacing") (you cannot use any spaces in the name of your new command)

4) copy the executables into C:\WINDOWS\system32
Image
User avatar
JabbaPapa
PRO VETERAN
PRO VETERAN
 
Posts: 9499
Joined: Sun Feb 22, 2004 5:17 pm
Location: Monte-Carlo
Real Name: Julian Lord


Return to General Windows Support

Who is online

Users browsing this forum: No registered users and 0 guests