Commit 10ac5f7a authored by Jos Lieben's avatar Jos Lieben

wait for installer to finish and move forgotten var to subscript

parent 2d7ba186
......@@ -24,7 +24,6 @@ $listOfFoldersToRedirectToOnedriveForBusiness = @(#One line for each folder you
#OPTIONAL CONFIGURATION:
$xmlDownloadURL = "https://g.live.com/1rewlive5skydrive/ODSUInsider"
$onedriveRootKey = "HKCU:\Software\Microsoft\OneDrive\Accounts\Business"
$temporaryInstallerPath = Join-Path $Env:TEMP -ChildPath "OnedriveInstaller.EXE"
$logFile = Join-Path $Env:TEMP -ChildPath "OnedriveAutoConfig.log"
......@@ -167,6 +166,7 @@ $listOfFoldersToRedirectToOnedriveForBusiness | % {
$localScriptContent = $localScriptContent -replace ".$"
$localScriptContent += ")
`$logFile = Join-Path `$Env:TEMP -ChildPath `"OnedriveAutoConfig.log`"
`$onedriveRootKey = `"HKCU:\Software\Microsoft\OneDrive\Accounts\Business`"
`$desiredBootScriptFolder = `"$desiredBootScriptFolder`"
`$desiredBootScriptPath = `"$desiredBootScriptPath`"
Start-Transcript -Path `$logFile
......@@ -213,8 +213,21 @@ try{
`$installedVersionPath = Join-Path `$Env:LOCALAPPDATA -ChildPath `"Microsoft\OneDrive\OneDrive.exe`"
Write-output `"Will use auto-guessed value of `$installedVersionPath, but first running updater...`"
runProcess `$updaterPath
Write-output `"Updated has finished!`"
Write-output `"Updated has finished! Checking remaining processes...`"
Sleep -s 15
`$waited = 0
while(`$true){
if(get-process | where {`$_.ProcessName -like `"onedrivesetup*`"}){
Write-Output `"Installer still running in the background..`"
Sleep -S 10
`$waited += 10
if(`$waited -gt 600){
break
}
}else{
break
}
}
}
#WAIT FOR CLIENT CONFIGURATION AND REDETERMINE PATH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment