A Digital Age Deserves A Digital Leader

MS DOS Custom Command Question

MS DOS Custom Command Question

Postby Vanilla » 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.
PRO New Member
Posts: 2
Joined: Mon Oct 31, 2011 5:00 pm

Re: MS DOS Custom Command Question

Postby yeshuas » 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
ASUS Maximus V Gene MB
Windows 8 X64; Windows 7 X64; Windows 7 X86
Intel I5-3570K
16GB Corsair Vengeance Ram
eVGA GeForce GTX 550 TI
Corsair GS700 PS
1TB Seagate SATA 6.0Gb HD
Thermaltake Case
Software Development
User avatar
Posts: 5075
Joined: Wed Jan 17, 2007 3:29 pm
Location: Chicago, IL
Real Name: Daniel Schmidt

Re: MS DOS Custom Command Question

Postby Vanilla » 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.
PRO New Member
Posts: 2
Joined: Mon Oct 31, 2011 5:00 pm

Re: MS DOS Custom Command Question

Postby JabbaPapa » 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
PRO VETERAN
User avatar
Posts: 9538
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

cron
cron