Skip to content

Latest commit

 

History

History

ODOnDemandSetup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset0 Courier New;}{\f2\fnil\fcharset2 Symbol;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1 
\pard\sl240\slmult1\qc\b\f0\fs32\lang9 OnDemand monitoring\b0\fs22\par

\pard\sl240\slmult1\par
\b Disclaimer\par
\b0 Be aware that this software is provided "AS IS". This is a release candidate and may never see the light of the day.\par
\par
\b Getting things ready\b0\par

\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-360\li720\sl240\slmult1 In order to monitor OneDrive NEEDS to be on the notification area of the taskbar\par
{\pntext\f2\'B7\tab}If auto monitoring is not enabled the log will onlys starts after the first change in status\par
{\pntext\f2\'B7\tab}The log file location is %LOCALAPPDATA%\\OneDriveMonitor\\Logs\par
{\pntext\f2\'B7\tab}Registering the application to monitor OneDrive (auto monitoring) if option was not chosen during installation (the option is selected by default):\par

\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-360\li1080\sl240\slmult1 Run cmd as administrator\par
{\pntext\f2\'B7\tab}run this command: ODOnDemand.exe -onLaunch\par

\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-360\li720\sl240\slmult1 If things were correct you will see [Debugger="path-to-app\\ODOnDemmand.exe" -launch] under one of the following keys in regedit.\par

\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-360\li1080\sl240\slmult1 For 64-bit OS: HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\OneDrive.exe\par
{\pntext\f2\'B7\tab}For 32-bit OS: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\OneDrive.exe\par

\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-360\li720\sl240\slmult1 The monitoring will ONLY take effect next time OneDrive.exe is loaded\par

\pard\sl240\slmult1\par
\b Unregistering the monitor\par

\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-360\li720\sl240\slmult1\b0 Run cmd as administrator\par
{\pntext\f2\'B7\tab}run this command: ODOnDemand.exe -clear\par
{\pntext\f2\'B7\tab}If the command does not work you need only to delete key Debugger on one of the keys in previous instructions\par
{\pntext\f2\'B7\tab}Running for the first time or running when auto monitoring is not set (-onLaunch)\par
{\pntext\f2\'B7\tab}The automatic monitoring will only happens when OneDrive.exe starts (reboot or new sign in)\par
{\pntext\f2\'B7\tab}You may choose to run only when you need it, but remember that any log entry will happen after a change in status\par
{\pntext\f2\'B7\tab}If you want to attach to a running OneDrive instance get the PID in Task Manager or using this PowerShell command: Get-Process -Name OneDrive | Select Id\par
{\pntext\f2\'B7\tab}There may be more than one instance of OneDrive (personal and business) and you need to attach to both\par
{\pntext\f2\'B7\tab}This command will attach to the process: ODOnDemand.exe -attach PID where PID is the process id.\par

\pard\sl240\slmult1\par
\b Example of PowerShell script to capture the latest status\par
\b0\par
\f1\fs16 $content = Get-Content -Path "$($env:LOCALAPPDATA)\\OneDriveMonitor\\Logs\\OneDriveMonitor_$((Get-Date).ToString('yyyy-MM-dd')).log";\par
$lastStatus = '';\par
for($count=$content.Count-1;$count -gt 0; $count--)\par
\{\par
    if($content[$count].Contains('IconChange'))\par
    \{\par
        $lastStatus = $content[$count].Split("`t")[3];\par
        $lastStatus = $lastStatus.Split("'")[1];\par
        break;\par
    \}\par
    \par
\}\par
\par
Write-Host $lastStatus\par
}