PS C:\WINDOWS\system32> rclone config // 第一步在终端输入 rclone config 2020/06/2219:36:22 NOTICE: Config file "C:\\Users\\12412\\.config\\rclone\\rclone.conf" not found - using defaults No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n //第二步输入n创建新的配置, name> Onedrive_local //第三步 输入一个英文名称 ,中间也不要有空格 Type of storage to configure. Enter a string value. Press Enter for the default (""). Choose a number from below, or typein your own value 1 / 1Fichier \ "fichier" 2 / Alias for an existing remote \ "alias" 3 / Amazon Drive \ "amazon cloud drive" 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc) \ "s3" 5 / Backblaze B2 \ "b2" 6 / Box \ "box" 7 / Cache a remote \ "cache" 8 / Citrix Sharefile \ "sharefile" 9 / Dropbox \ "dropbox" 10 / Encrypt/Decrypt a remote \ "crypt" 11 / FTP Connection \ "ftp" 12 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage" 13 / Google Drive \ "drive" 14 / Google Photos \ "google photos" 15 / Hubic \ "hubic" 16 / In memory object storage system. \ "memory" 17 / Jottacloud \ "jottacloud" 18 / Koofr \ "koofr" 19 / Local Disk \ "local" 20 / Mail.ru Cloud \ "mailru" 21 / Mega \ "mega" 22 / Microsoft Azure Blob Storage \ "azureblob" 23 / Microsoft OneDrive \ "onedrive" 24 / OpenDrive \ "opendrive" 25 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift" 26 / Pcloud \ "pcloud" 27 / Put.io \ "putio" 28 / QingCloud Object Storage \ "qingstor" 29 / SSH/SFTP Connection \ "sftp" 30 / Sugarsync \ "sugarsync" 31 / Tardigrade Decentralized Cloud Storage \ "tardigrade" 32 / Transparently chunk/split large files \ "chunker" 33 / Union merges the contents of several upstream fs \ "union" 34 / Webdav \ "webdav" 35 / Yandex Disk \ "yandex" 36 / http Connection \ "http" 37 / premiumize.me \ "premiumizeme" 38 / seafile \ "seafile" Storage> 23 //第四步 输入要配置的网盘类型 因为我们要配置Microsoft OneDrive 因此输入23 ** See help for onedrive backend at: https://rclone.org/onedrive/ **
Microsoft App Client Id Leave blank normally. Enter a string value. Press Enter for the default (""). client_id> //第五步 直接回车 Microsoft App Client Secret Leave blank normally. Enter a string value. Press Enter for the default (""). client_secret> //第六步 直接回车 Edit advanced config? (y/n) y) Yes n) No (default) y/n> n //第七步 输入n 不进行高级配置 Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes (default) n) No y/n> y //第八步 输入y 使用自动配置授权 If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=DWKiZ1cLZoWl9buxJbPXgw Log in and authorize rclone for access Waiting for code... Got code Choose a number from below, or type in an existing value 1 / OneDrive Personal or Business \ "onedrive" 2 / Root Sharepoint site \ "sharepoint" 3 / Type in driveID \ "driveid" 4 / Type in SiteID \ "siteid" 5 / Search a Sharepoint site \ "search" Your choice> 1 //第九步 输入1 因为现在我配置的是 OneDrive Personal or Business 类型的网盘 Found 1 drives, please select the one you want to use: 0: (personal) id=58719e3298535c9 Chose drive to use:> 0 //第十步 输入0 Found drive 'root' of type 'personal', URL: https://onedrive.live.com/?cid=058719e3298535c9 Is that okay? y) Yes (default) n) No //第十一步 直接回车 y/n> -------------------- [Onedrive_local] type = onedrive token = {"access_token":"BAAUO9chh8cJscQLmU+LSWpbnr0vmwwAAZ6th5X8qdv3jqko0KCKeFVHdJigXdmpkGf3aO/W9HQahNAmDTxEVF2TnPtPNCw7M/me6FRz4mD9+x/jfJIb8Qewi8NpYMfYXdmPyUUVcPp1G+bwKOIFfJlNa6Can21gaGhTKgdEaz27GwetIvwjy7Qo/eDh/jarwoHEKljM8fN3UF1xz/RS0Ir+DC6CrvNIP3MUpbBF31/qUWJekWn3XqdT1j6m9bBfJ9Xk8heaY1/MT+1SA6fs6IPV5mO5m6dtjfsr1wO3xLGuaEutBPlNT9t219R55MZibwt746mw+VRTMCLsMrFZqVGK6IHzXyG3t+5NOrdP9y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pRXYsqSBdwX6pJEQnRzCDcJimHxXBEV59rE*Ykwc9SijTkBN4haK6br9y2YVQ2UKegfQiErCHY33kzmSMAPJUwiooUNc6GytUz5O6ZxsBMghhb6B6NiSBCs!U5xRon1y*zzOsh9EArHk4y2rihu7BkkC13bJqxeMvhw$","expiry":"2020-06-22T20:38:09.8687266+08:00"} drive_id = 58719e3298825c9 drive_type = personal -------------------- y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> //第十二步 回车 Current remotes: Name Type ==== ==== Onedrive_local onedrive //显示你的设置则成功! e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q //第十三步 输入q结束配置
OptionExplicit Dim WMIService, Process, Processes, Flag, WS Set WMIService = GetObject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2") Set Processes = WMIService.ExecQuery("select * from win32_process") Flag = true foreach Process in Processes ifstrcomp(Process.name, "rclone.exe") = 0then Flag = false exitfor endif next Set WMIService = nothing if Flag then Set WS = Wscript.CreateObject("Wscript.Shell") WS.Run "rclone mount Onedrive_local:/ Q: --cache-dir C:\Users\97532\Rclone --vfs-cache-mode writes", 0 endif