Go Premium for a chance to win a PS4. Enter to Win

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
?
541 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
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

927 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