How to synchronize IE favorites to OneDrive (VBScript)

Introduction

The goal of this script is synchronizing IE favorites to OneDrive.

Scenarios

On Windows 8.1 Internet Explorer 11 can synchronize favorites. However there is no functionality on older systems such as Windows 7. This script is to synchronize IE favorites with OneDrive.

Script

Step 1: Double click the script.

Step 2: Then if you have installed OneDrive and have selected the default installation, you will get the following figure.

Here are some code snippets for your reference:

JavaScript
Edit|Remove
If USFvalue = OneDriveF Then  
    WScript.Echo "you have set favorites to OneDrive" 
ElseIf USFvalue =  SkyDriveF Then  
    WScript.Echo "you have set favorites to OneDrive" 
Else  
  
        Set FSO = CreateObject("Scripting.FileSystemObject") 
         
        If FSO.FolderExists(SkyDrive) = True  Then  
             
            FSO.CopyFolder DefaultF, SkyDrive , True  
            objshell.RegWrite USFpath, SkyDriveF 
            objshell.RegWrite SFpath,  SkyDriveF 
            WScript.Echo "Move IE favorites to OneDrive successfully." 
        ElseIf FSO.FolderExists(OneDrive) = True Then  
             
            FSO.CopyFolder DefaultF, OneDrive , True  
            objshell.RegWrite USFpath, OneDriveF 
            objshell.RegWrite SFpath, OneDriveF  
            WScript.Echo "Move IE favorites to OneDrive successfully." 
        Else       
            WScript.Echo "Not find OneDrive installed." 
        End If  
End If  
Prerequisite

Windows 7 or higher version

OneDrive

Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.