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 20 seconds for Onedrive to initiate
  8. START \\Appsserver\files$\onedrive\odl2.exe
  9. timeout 12 /nobreak
  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. "%localappdata%\Microsoft\OneDrive\OneDrive.exe"
  14. Rem - Create Completion File
  15. echo.>"%USERPROFILE%\onedrivesetup.txt"
  16. @echo Onedrive should now be setup for use.
  17. START \\Appsserver\files$\onedrive\odl3.exe
  18. timeout 5
  19. exit
  20. :End
  21. Exit