Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo off
- @echo OneDrive is initiating, please wait while we setup onedrive for the first time on this computer.
- IF EXIST %USERPROFILE%\onedrivesetup.txt (goto End) else (Goto Start)
- :start
- IF EXIST %localappdata%\Microsoft\OneDrive\Update\OneDriveSetup.exe (goto scriptstart) else (Goto start)
- :scriptstart
- @echo Waiting 12 seconds for Onedrive to initiate
- timeout 12 /nobreak
- Rem - Run First Time Setup
- %localappdata%\Microsoft\OneDrive\Update\OneDriveSetup.exe
- Rem - Enable Modern Authentication
- reg add HKCU\Software\Microsoft\OneDrive /v EnableADAL /t REG_DWORD /d 1 /f
- Rem - Launch Onedrive Folder
- "%localappdata%\Microsoft\OneDrive\OneDrive.exe"
- Rem - Create Completion File
- echo.>"%USERPROFILE%\onedrivesetup.txt"
- @echo Onedrive should now be setup for use.
- timeout 5
- exit
- :End
- Exit
Advertisement
Add Comment
Please, Sign In to add comment