Solved

VB script to copy DNS cash from RAM in to text file  and other script to copy DNS cash from text file to RAM

Posted on 2007-11-23
7
530 Views
Last Modified: 2013-12-25
hi
can any one help me with my probem
i want to get program or any VB script to copy DNS cash from RAM in to text file  and other script to copy DNS cash from text file to RAM
as the DNS cash is store in RAM and after i restart my server the DNS cash is empty therefor i want to copy the DNS cash from RAM before i restart the computer then restore it after the server start

thanks
0
Comment
Question by:nasemabdullaa
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:MeCanHelp
ID: 20339864
You can retreive data directly from RAM via script in Windows, you don't have direct hardware access but through the kernel. If you can get Gates to allow you access please send info.

However if all you are trying to do if flush your DNS cache you can create a script that will do so, if you want it to run on startup you can drop the script into your startup folder or add it to you Run key in the registry under Local Machine.

Would that work?
0
 

Author Comment

by:nasemabdullaa
ID: 20342118
hi
thanks for your reply
>>>You can retreive data directly from RAM via script in Windows, you don't have direct hardware access but through the kernel. If you can get Gates to allow you access please send info

i want to copy the DNS cash from server (to text file) before i restart the server  (using VB script) then after the server start i restore the DNS cash to server from text file then send this cash to client
how i can write the script do this function or find it in windows

>>>>However if all you are trying to do if flush your DNS cache you can create a script that will do so, if you want it to run on startup you can drop the script into your startup folder or add it to you Run key in the registry under Local Machine
i know how i can add the script to startup script in windows.
but if i want to add it using RUN key how i can do that

thanks


0
 
LVL 4

Expert Comment

by:MeCanHelp
ID: 20342963
Why don't you just setup a DNS cache only server, then you wouldn't have to do this. What is your purpose for want to copy the DNS cache to file, I'm just curious ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:nasemabdullaa
ID: 20345506
hi
thanks for your reply
i do that but at the end of day i shutdown tha server therefore at second day morning i start the server and the cash is empty
and may time i stop the server because power failure

thus i need to copy the dns  cash and restoe it at evry morning or after evry power failure

thanks
0
 
LVL 4

Expert Comment

by:MeCanHelp
ID: 20365551
You don't have any type of backup solution that saves this file to tape so that you can restore. ? If you need to copy the file somewhere this will do

dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("c:\windows\system32\dns\cache.dns") Then
   filesys.CopyFile "c:\sourcefolder\anyfile.html", "c:\destfolder\"
End If
0
 

Author Comment

by:nasemabdullaa
ID: 20387834
hi
thanks for your reply
>>>>c:\windows\system32\dns\cache.dns
this is the cash of dns (root server)
i want to save the cash of dns for each page open in server (which is in RAM)

thanks
0
 
LVL 4

Accepted Solution

by:
MeCanHelp earned 125 total points
ID: 20414578
As I explained to you earlier you can not directly access data in RAM.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now