
The OneDrive executable can be found in the following locations: in the %ProgramFiles% folder, typically at C:\Program Files\Microsoft OneDrive, or in the %ProgramFiles(x86)% folder for 32-bit systems.
The executable is usually named OneDrive.exe or OneDriveSetup.exe, depending on the installation type.
There are two main installation types: the 32-bit and 64-bit versions. The 32-bit version is installed in the %ProgramFiles(x86)% folder, while the 64-bit version is installed in the %ProgramFiles% folder.
Both installation types can be uninstalled through the Control Panel or the OneDrive settings application.
A different take: Location of Onedrive Executable with 64 Bit Office
Checking Installation Location
Checking Installation Location can be done by looking for the OneDrive.exe file in the Program Files directory.
The script checks if the installation location is in "C:\Program Files\Microsoft OneDrive\OneDrive.exe" by using Test-Path and Select-String commands.
If the installation is found in "Program Files", the directory is set to "%LOCALAPPDATA%\Local\Microsoft\OneDrive\OneDrive.exe".
Alternatively, if the installation is not in "Program Files", the directory is set to "C:\Program Files\Microsoft OneDrive\OneDrive.exe" if it's found in the "AppData" directory.
Here's an interesting read: Microsoft Onedrive File Co Authoring Executable
Installation Types
For manual installation, the process is quite straightforward on Windows 10/11, where you can install the application using the same executable as the automated method.
The executable for manual installation on Windows 10/11 differs slightly for per-user and per-machine methods.
On Windows Server, you'll need to download the OneDrive installer from Microsoft, which is a separate step.
Make sure to follow the guidance in the Frame Scripting documentation page, as it provides crucial information on where to place the script for Frame to run it.
If you don't follow this guidance, the script may not run or work as desired in your workload VMs.
Discover more: Windows 11 Onedrive File Location
Removing OneDrive Installs
Removing OneDrive installs can be a bit tricky, but it's doable.
To remove the per-user installation of OneDrive on Windows 10/11, you can use the Programs and Features applet or PowerShell.
One of the easiest ways to do this is through PowerShell, which allows for the use of endpoint management solutions.
Expand your knowledge: How Do I Use Onedrive
To open an elevated PowerShell window, simply search for "PowerShell" in the Start menu and right-click on the result to select "Run as administrator".
Once you have an elevated PowerShell window open, change the directory to C:\Windows\SysWOW64 by running the command `cd $env:windir\syswow64`.
Finally, run the command `. \onedrivesetup.exe /uninstall` to remove the OneDrive installation.
Recommended read: Powershell Onedrive
Sources
- https://superuser.com/questions/969489/onedrive-missing-after-windows-10-upgrade
- https://hansbrender.com/2020/03/21/onedrive-where-are-my-program-files-stored/
- https://learn.microsoft.com/en-us/answers/questions/1059569/onedrive-installation-detection-process-start
- https://docs.dizzion.com/solution-guides/2023/08/04/advanced-integration-microsoft-onedrive-frame
- https://strontic.github.io/xcyclopedia/library/OneDrive.exe-76C312F2EAC5CA8FED3434C7741187E8.html
Featured Images: pexels.com