Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript Backup function

Status
Not open for further replies.

scottohum

IS-IT--Management
Jul 5, 2011
14
GB
im looking for a script that will create a backup file (.bkf) of a specified file using the C:\Windows\System32\ntbackup.exe
Can someone help me please.
Thanks
Scott
 
Could you be a little more specific. Otherwise,

Code:
set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\path\ntbackup.ext", "c:\path\ntbackup.bkf"

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
ntbackup.exe i believe is the aplication that creates and restores backup files (.bkf)
what i am wanting is a script that will create a backup file of C:\Documents and Settings\Email User\ntuser.dat
That make sense?
 
No need to use ntbackup. It is easier and faster to simply copy the file with different file name.

ntuser.dat is the user's registry hive. If the user it belongs to was logged on after the last restart, Windows will have a handle on the file and it can't be copied using a script. Otherwise, the code I posted will achieve what you want. Although, after reading jges post, I, too, am unclear of your goal.

-Geates



"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
If you are after a registry backup, check the 'system state' option in the tree of the ntbackup GUI.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top