rodneyviana / ODSyncService

OneDrive service/DLL for Sync State
MIT License
93 stars 26 forks source link

Taskbar refreshes when you call Get-ODStatus #4

Closed yatesa closed 4 years ago

yatesa commented 5 years ago

Is is possible to stop the taskbar refreshing when you call Get-ODStatus with Powershell. We have a script that regularly runs and checks the OneDrive status but you keep seeing taskbar refresh each time. Not a major issue but just a bit annoying.

rodneyviana commented 5 years ago

The code would not (intentionally) cause any of this.

meramkumartrn commented 5 years ago

@rodneyviana, when the program executes the taskbar icon, are refreshed. Got any clue how to avoid.

rodneyviana commented 5 years ago

Are you talking about GetUnsynchedFiles()?

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: meramkumartrn notifications@github.com Sent: Monday, June 17, 2019 3:03:39 PM To: rodneyviana/ODSyncService Cc: Rodney Viana; Mention Subject: Re: [rodneyviana/ODSyncService] Taskbar refreshes when you call Get-ODStatus (#4)

@rodneyvianahttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frodneyviana&data=02%7C01%7C%7Ccda8bc0f0e064cb5050108d6f35ee4ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963986216655344&sdata=bSkxDDZTs0bhnRYDrFthBj%2FzqMXA6V%2BCFhf7ucJD5gc%3D&reserved=0, when the program executes the taskbar icon, are refreshed. Got any clue how to avoid.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frodneyviana%2FODSyncService%2Fissues%2F4%3Femail_source%3Dnotifications%26email_token%3DAGT5MAVXZLEQOO737PCYDRTP27UZXA5CNFSM4HJJKBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4JILI%23issuecomment-502830125&data=02%7C01%7C%7Ccda8bc0f0e064cb5050108d6f35ee4ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963986216665349&sdata=g3smPVrRvH9uBll9zc3qpjXzby0xS5hC1dG868%2Fl5wM%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGT5MAXG5M6TXTDXNTOZ4STP27UZXANCNFSM4HJJKBMQ&data=02%7C01%7C%7Ccda8bc0f0e064cb5050108d6f35ee4ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963986216675366&sdata=evBwAHus0oWPkMQ1iOQU%2B7T5ExercRxjDLyVKLNFvEQ%3D&reserved=0.

meramkumartrn commented 5 years ago

Nope Get-ODStatus

meramkumartrn commented 5 years ago

` Import-Module "C:\Users\meramkumar\Desktop\OneDriveLib.dll" -Verbose

do {

$message = (Get-ODStatus –Type Business)| Where {$_.StatusString -eq 'Error'}
If($message.StatusString -eq 'Error')
{
    Write-Host (Get-Date).ToString(),$env:UserName,$env:COMPUTERNAME,$message.StatusString, $message.LocalPath, $message.ServerType
}
start-sleep -seconds 5 

} until($x -eq 1)

`

meramkumartrn commented 5 years ago

@rodneyviana try the above code you will see when the folder has an error. to test it create a folder "forms" inside the one drive.

rodneyviana commented 5 years ago

This should not happen unless you have a large number of OneDrive connections or are using -ByPath.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: meramkumartrn notifications@github.com Sent: Monday, June 17, 2019 3:06:52 PM To: rodneyviana/ODSyncService Cc: Rodney Viana; Mention Subject: Re: [rodneyviana/ODSyncService] Taskbar refreshes when you call Get-ODStatus (#4)

Nope Get-ODStatus

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frodneyviana%2FODSyncService%2Fissues%2F4%3Femail_source%3Dnotifications%26email_token%3DAGT5MAX3P5DSVCVB2SHVL2TP27VFZA5CNFSM4HJJKBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4JRBI%23issuecomment-502831237&data=02%7C01%7C%7C1b0d535d766b47ee884608d6f35f572d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963988134931562&sdata=pI9A2Wn0LXmFVooobOUb370xgAnj515wP6OkFG1Cxak%3D&reserved=0, or mute the threadhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGT5MAS5A766D7BQLFYZ3WDP27VFZANCNFSM4HJJKBMQ&data=02%7C01%7C%7C1b0d535d766b47ee884608d6f35f572d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963988134941573&sdata=MXz%2FGCo2Odq8i6Yb9ASKBXMCh4WM98ugz8mMnyuZrhc%3D&reserved=0.

rodneyviana commented 5 years ago

In this loop situation this is a possibility.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: meramkumartrn notifications@github.com Sent: Monday, June 17, 2019 3:07:00 PM To: rodneyviana/ODSyncService Cc: Rodney Viana; Mention Subject: Re: [rodneyviana/ODSyncService] Taskbar refreshes when you call Get-ODStatus (#4)

` Import-Module "C:\Users\meramkumar\Desktop\OneDriveLib.dll" -Verbose

do {

$message = (Get-ODStatus –Type Business)| Where {$_.StatusString -eq 'Error'}

If($message.StatusString -eq 'Error')

{

Write-Host (Get-Date).ToString(),$env:UserName,$env:COMPUTERNAME,$message.StatusString, $message.LocalPath, $message.ServerType

}

start-sleep -seconds 5

} until($x -eq 1)

`

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frodneyviana%2FODSyncService%2Fissues%2F4%3Femail_source%3Dnotifications%26email_token%3DAGT5MAW6EUMY54TH4CUM53LP27VGJA5CNFSM4HJJKBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4JRNA%23issuecomment-502831284&data=02%7C01%7C%7C329dd55bb05644b071c208d6f35f5bfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963988216080137&sdata=RxsNtpkwZa5xWK5EA%2FC6t3syS5BNkR4urLlEe%2F8Yq24%3D&reserved=0, or mute the threadhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGT5MAV6KGDU4OHQKFN2OT3P27VGJANCNFSM4HJJKBMQ&data=02%7C01%7C%7C329dd55bb05644b071c208d6f35f5bfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636963988216090141&sdata=Y9BDD8Xu29CjL0DUrpZYCtAZsBf5g1g7ZqxzStF39nw%3D&reserved=0.

meramkumartrn commented 5 years ago

@rodneyviana Got it I will try to schedule via windows scheduler.

srzelic-zz commented 5 years ago

I have the same issue.. Any resolution?

rodneyviana commented 5 years ago

This is by design. See the workarounds in the thread.

Get Outlook for iOShttps://aka.ms/o0ukef


From: srzelic notifications@github.com Sent: Wednesday, September 4, 2019 5:55:17 PM To: rodneyviana/ODSyncService ODSyncService@noreply.github.com Cc: Rodney Viana fox_mulder_x_2003@hotmail.com; Mention mention@noreply.github.com Subject: Re: [rodneyviana/ODSyncService] Taskbar refreshes when you call Get-ODStatus (#4)

I have the same issue.. Any resolution?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frodneyviana%2FODSyncService%2Fissues%2F4%3Femail_source%3Dnotifications%26email_token%3DAGT5MATX73JW65ZSVDRRKQ3QIA4FLA5CNFSM4HJJKBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD55IMVA%23issuecomment-528123476&data=02%7C01%7C%7Cd0d518820d074ad36e7908d7318af51b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637032345187263441&sdata=fNfbcSFGwYLL1sy%2Bm217tS4minWyiP%2FRoA8LhHaoG64%3D&reserved=0, or mute the threadhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGT5MARSDEC6F34FWKC6BKLQIA4FLANCNFSM4HJJKBMQ&data=02%7C01%7C%7Cd0d518820d074ad36e7908d7318af51b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637032345187263441&sdata=Gjsy2LWHhd4TYw2gpvls0%2ByEyjX86sclYAc4yrRPi1M%3D&reserved=0.

srzelic-zz commented 5 years ago

Maybe I'm blind but I don't see any workaround in this thread? I'm not using -bypath or two many connection (2-5).

srzelic-zz commented 5 years ago

Anyone resolved this issue?

meramkumartrn commented 5 years ago

There is no solution I did by running the code every hour. always it flicks the screen for a second.

srzelic-zz commented 5 years ago

We did the same but all users are complaining and taskbar flickers several times. Rodneyviana mentioned that there is a workaround in thread but I don't see it.

rodneyviana commented 4 years ago

The workaround is not to run with -ByPath and only once an hour.