Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
539 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 375 total points
ID: 20414578
As I explained to you earlier you can not directly access data in RAM.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 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