Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. @Echo off
  2. @echo OneDrive is initiating, please wait while we setup onedrive for the first time on this computer.
  3. IF EXIST %USERPROFILE%\onedrivesetup.txt (goto End) else (Goto Start)
  4. :start
  5. IF EXIST %localappdata%\Microsoft\OneDrive\Update\OneDriveSetup.exe (goto scriptstart) else (Goto start)
  6. :scriptstart
  7. @echo Waiting 12 seconds for Onedrive to initiate
  8. timeout 12 /nobreak
  9. Rem - Run First Time Setup
  10. %localappdata%\Microsoft\OneDrive\Update\OneDriveSetup.exe
  11. Rem - Enable Modern Authentication
  12. reg add HKCU\Software\Microsoft\OneDrive /v EnableADAL /t REG_DWORD /d 1 /f
  13. Rem - Launch Onedrive Folder
  14. "%localappdata%\Microsoft\OneDrive\OneDrive.exe"
  15. Rem - Create Completion File
  16. echo.>"%USERPROFILE%\onedrivesetup.txt"
  17. @echo Onedrive should now be setup for use.
  18. timeout 5
  19. exit
  20. :End
  21. Exit