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
537 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
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…
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

628 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