VBS to Backup Folder and then Restore from Reg
I would like to make a vbs script that backups up all the files located in x:\xxx\session\*.* to c:\temp\winteg by finding the path in the following registry key:
In other words it will get the current install location C:\wInteg6\ from the reg key mentioned above as different customers install this to different locations and then it can backup all files from C:\wInteg6\session to c:\temp.
Im am currently getting the customers to do this manually using the following vbs script but would prefer this to be done seamlessly:
Const WINDOW_HANDLE = 0
Const NO_OPTIONS = 0
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
(WINDOW_HANDLE, "Select a folder:", NO_OPTIONS, "C:\Scripts")
Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path
Const OverWriteFiles = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFolder objPath , "C:\temp\winteg" , OverWriteFiles
Please help me find a way to do this automatically.