'--START--
'This will backup your CoD4 Player profiles to a folder called CoD4_Profile_Backup in
'My Documents folder. To use this script, save it to a file called
'CoD4_Profile_Backup.vbs' and run it - Originally by Ized modified by Urban.
Option Explicit
On Error Resume Next
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim oShell : Set oShell = CreateObject("WScript.Shell")
Dim strInstallPath, strKey
strKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Activision\Call of Duty 4\InstallPath"
strInstallPath=oShell.RegRead(strKey)
If Len(strInstallPath)=0 Then
MsgBox("COD4 is not installed!?")
Wscript.Quit
End If
Dim strSavePath
strSavePath=oShell.SpecialFolders("MyDocuments") & "\CoD4_Profile_Backup"
If Not oFSO.FolderExists(strSavePath) Then oFSO.CreateFolder(strSavePath)
Err.Clear
oFSO.CopyFolder strInstallPath & "\players\profiles", strSavePath, True
If Err.Number=0 Then
MsgBox "Backup Sucessful - Saved to folder '" & strSavePath & "'"
Else
MsgBox "Error while copying profile #" & Err.Number & " - " & Err.Description
End If
Set oShell = Nothing
Set oFSO = Nothing
'--END--
All times are GMT - 6 Hours