Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2016
    Location
    Sussex, UK
    Posts
    160

    Angry Installing ACP on a new Windows 10 machine - Problems with OneDrive (I think)

    I recently needed to replace my old PC with a new Windows 10 machine. That meant doing a complete new install of all my software.
    Now it seems that Windows OneDrive is interfering with the correct operation of ACP and Maxim. Briefly summarised:

    1. All new files created by ACP are stored in a documents folder under OneDrive instead of the normal Documents folder.
    2. The permissions for the OneDrive folder are "Read Only" and Windows won't let me change them.
    3. This means that when doing a training run for pointing image files for plate solving cannot be stored and the script terminates.
    4. Have tried uninstalling OneDrive, but the OneDrive directory is still present and cannot be deleted.
    5. Moving the content of the OneDrive Directory to a normal documents directory doesn't help. I just end up with multiple documents folders and have no idea which one is actually current.
    6. This problem arises essentially with all the Observatory software: ACP, Maxim, FocusMax, etc. It all gets shoved into OneDrive.
    7. In short, my hard drive is now in a mess, and I have no idea how to sort it out, other than re-formatting and starting again. Please tell me that's not a good idea!
    8. Help!

  2. #2
    Join Date
    Nov 2015
    Location
    Christchurch, Dorset, United Kingdom
    Posts
    436

    Default OneDrive integration with Windows 10

    Stephen.

    I guess that as this post is a few days old you have already gone ahead and wiped the hard drive and reinstalled Windows 10?

    Unfortunately Microsoft have decided to integrate and enable OneDrive right from the start with the latest builds of Win 10 and this is problematic when Windows 10 is being used for automation purposes where you want file write-read operations to occur in real time to your local hard drive and not be subject to the vagaries of internet access to a remote server (Microsoft OneDrive), in addition OneDrive is now tightly bound to Windows Ransomware Protection and when Ransomware protection is enabled this places limits on which apps can write to the OneDrive folder unless given explicit permission to do so.

    Unpicking the mess that you now are in will depend on how well the applications that are currently trying to write to the OneDrive folder by default can be redirected to the local documents folder after OneDrive is disabled and removed. Much of this configuration is kept in the Windows registry and many Astro apps do not make a good job of removing their registry settings when de-installing - reinstalling, you might need to manually edit the registry to fix those problems.

    If you are unsure how to edit the registry then re-installing Windows and starting from scratch will be the easiest option.
    Have you a copy of Windows 10 and a valid license or are you going to rebuild from a recovery partition that was included with your computer?
    With Windows 10, unless the hard drive is damaged then you can use Windows built-in recovery options to re-install Windows 10 (using the "Without Apps" option) and this will reset the registry automatically. This is the best option since your Windows licence is kept valid and you don't need to search for the recovery media that was supplied with your new computer or boot into the recovery partition if the manufacturer provided one.

    You can try the following steps to disable and remove OneDrive from your current system and see if your apps are able to repair themselves by re-running their installers, in any case, if you do re-install Windows 10 you should disable and remove OneDrive before reinstalling your astronomy automation apps.

    To remove OneDrive:

    1. Sign out of OneDrive, mouse-right-click the cloud icon on the task bar at the bottom of the desktop and click "Settings" then select the "Unlink this PC" option, if not visible it might be grouped together with other taskbar icons, click on the ^ taskbar icon to reveal the full set of background tasks.

    2. Uninstall OneDrive by typing "Programs" in the taskbar search field and follow the link to "Add or remove programs - System Settings" then in the "Apps & features" page scroll down and search for, or type in the search field, "OneDrive", click the listing for OneDrive and then select "Uninstall"

    3. Only for Windows 10 Pro and Enterprise versions a final change is needed in Local Group Policy Editor.
    Type in the task bar search field "run" and click the link to "Run app" to launch the Run dialogue window.
    In the Run window type "gpedit.msc" (without quotes) to launch the Local Group Policy Editor.
    In the Local Group Policy Editor window, in the left pane under "Local Computer Policy", open the folder "Administrative Templates" and scroll down to the folder "Windows Components", open this folder and then scroll down to, and click on "OneDrive".
    In the right side pane there are a list of OneDrive policies, click the "Extended" tab at the bottom of the pane and then double click on each policy in turn as listed below and then click the respective config bullet points followed by the "Apply" button, most of these are not relevant to Windows 10 but it is easier to set these all to the appropriate setting for a Windows computer that is integral to an automation system:
    "Save documents to OneDrive by default" select "Disabled" and apply.
    "Prevent OneDrive from generating network traffic...." select "Enabled" and apply.
    "Prevent OneDrive from syncing over a metered connection" select "Enabled" and apply.
    "Prevent the usage of OneDrive for file storage" select "Enabled" and apply.
    "Prevent the usage of OneDrive for file storage on Windows 8.1" select Enabled and apply.
    Exit the Local Group Policy Editor and reboot the computer.

    Now, after you restart the computer and go to the file explorer your OneDrive folder(s) should have been deleted and the only documents folder visible is the local documents. Your files that were in the OneDrive folder are still there on Microsoft's remote OneDrive server but you can no longer access that remote server folder from this computer unless you re-install OneDrive, sign-in to OneDrive and reverse the OneDrive Group Policies as appropriate.
    If you have another Windows computer with OneDrive enabled you can still access those files when you sign in to your OneDrive account.

    The above information is widely documented across the web, usually with added pictures and step-by-step guides, which I am unable to replicate for this reply as I am away from home and working remotely, but if you Google search for "uninstall OneDrive Windows 10" you will find hundreds of pages that show you how to do this.

    HTH.
    Last edited by William Bristow; Oct 1, 2021 at 10:33. Reason: Text tidied

  3. #3
    Join Date
    Sep 2016
    Location
    Sussex, UK
    Posts
    160

    Default

    Dear William,

    Many thanks for taking the trouble to reply in such detail.

    I have not yet taken the nuclear option of reformatting, so your comments are extremely helpful.

    In fact, I have already executed some of the steps you mention, but unfortunately in the wrong order.
    The first thing I did was to try to uninstall OneDrive. Probably I should have signed out first.
    Then I tried shifting files around as already reported, but that was a disaster. Then I tried using the gpedit method you outline, but the OneDrive folder is still present with ACP, Maxim, etc documents contained in it.

    I suppose the next step is to use the Windows built-in recovery option to re-install Windows without apps, followed by disabling and uninstalling OneDrive.
    I will follow that route next, unless anyone thinks that a bad idea.. In particular, I am anxious to hear what Bob Denny has to say on the subject. He has been strangely quiet so far...

    All the best,
    Stephen

  4. #4
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,937

    Default

    I’ve been quiet because this is not my area of expertise (Windows system administration), and I cannot begin to imagine the state your system is in. I apologize. I was hoping for someone more skilled than me, and William responded. He’s far more skilled than I am in this area!
    -- Bob

  5. #5
    Join Date
    Sep 2016
    Location
    Sussex, UK
    Posts
    160

    Default

    Dear Bob & William,

    Thanks both for your comments.
    This is what I have done, and the result.
    1. Using Windows built-in recovery option, I reset Windows without Apps. This is supposed to set everything, including the Registry, back to a clean version. Data is retained.
    2. I then unlinked the Computer from OneDrive by visiting the settings window of OneDrive.
    3. Next I uninstalled OneDRive from the "Programs and Features" option in Control Panel.
    4. Then, as recommended by William, I went to the Group Policy Editor and enabled/disabled all the OneDrive policies mentioned by William.
    5. Then I rebooted the machine.
    6. I was expecting that the OneDRive folder would now have disappeared from my hard drive, but no such luck. I tried deleting it but it always returned.
    7. Pressing on regardless, I then re-installed Maxim, ACP, FocusMax and some other Observatory-related stuff I need. After several hours of configuring the software and getting all the USB ports to work, I then tried again to run ACP, in particular the Train Corrector Script.
    8. Same result as before! The Script keeps terminating because Maxim cannot write any files to a documents folder stored under the OneDRive folder.
    9. On examining the OneDrive folder, I find that again it mysteriously includes sub-folders for ACP Astronomy, Maxim DL6, and ASCOM, as well as a folder related to my Dome control software.

    It is not clear to me what is going on here. Why does Windows select ACP, Maxim, ASCOM and the Dome software for special attention? And why is OneDRive still being accessed by the system after being uninstalled and disabled?
    I imagine that the only way (other than a completely clean re-install) to sort out the mess is to make manual edits to the Registry to remove the registry settings for ACP, Maxim, ASCOM and FocusMax before reinstalling. Can anyone assist me to do this? I know how to use Regedit, but finding the right bits to edit is the problem.

    Stephen

  6. #6
    Join Date
    Nov 2015
    Location
    Christchurch, Dorset, United Kingdom
    Posts
    436

    Default OneDrive problems

    Stephen.

    I don't think Bob will be able to help you with this at the present time as it is due to fundamental changes in the way that Windows generally has been evolving towards a subscription based - cloud based OS. Microsoft have wanted to introduce a subscription based OS for years to avoid the boom-bust cycle that comes with each new Windows platform but the hardware industry and the buying public have been less than enthusiastic and so Microsoft are approaching this from a different direction and tying in OneDrive as the default location for your documents in the hope that most users, who are not IT skilled, will quickly fill the free allocation of OneDrive space and then take out a subscription for extra storage.

    Bob, like most developers, will probably be working with Windows 10 clones or virtual machines that were set up on older hardware, probably several years ago, and even though he will have installed all the current updates on those clones he will not have the same Windows environment that you, or anyone else buying a new Windows PC today, will experience.

    In particular, setting up Windows 10 on new hardware that includes Intel Gen 8 or above CPU and the TPM.2.0 co-security encryption module (Trusted Platform Module) creates a very different system environment from a Windows 10 setup on older Intel Gen 7 CPU (and earlier) without TPM.2.0.

    The next few years will be quite interesting for app developers I think as Windows 11 is rolled out and millions of users who's current hardware does not include or support the TPM2.0 module or have unsupported CPU's and graphics cards begin the forced upgrade of their older hardware or face being left unsupported after 2025 on Win 10.

    Let's try approaching this problem from a different direction, editing the registry really should be the last resort because you would most likely have to keep doing this each time you install app updates and Windows updates.

    The reason that the OneDrive folders keep returning is because of the way that OneDrive is bound to your personal Microsoft account and folder protection settings, these would have been resynchronised over the internet as you rebuild Windows and logged back into your Microsoft account so we could try a different approach to the problem to create a new set of OneDrive policies for your machine.

    I'm sorry but being away from home at the moment I'm limited to a tablet to access my home Mac and Windows VM's remotely and with no image editing apps on the tablet this can only be a text description, I can't add images to help.

    First check the status of Controlled Folder Access (CFA) and switch it off.
    Open Windows settings and navigate to "Virus & threat protection".
    Scroll down the Virus & threat protection page to the heading "Ransomware protection", click the link for "Manage ransomware protection".
    On the Ransomware protection page ensure that the software switch for "Controlled Folder Access" is turned off.
    Note: If you use certain third party Antivirus Software you may find that you have no control over CFA and can not disable or enable it since this function is commandeered by the AV software as part of their protection suite, if this applies to you check the user manual for the AV software for how to control CFA and how to add programs to the permitted apps list.

    Next, re-install OneDrive.
    To do this navigate to this folder using File Explorer:
    C:\Windows\WinSxS.
    Once in the WinSxS folder type in the search box, top right of the File Explorer window "OneDriveSetup.exe" and hit enter to search the WinSxS folder, note that you won't be able to find this file by scrolling through the WinSxS folder manually as it is a hidden file.
    After a brief search the "OneDriveSetup.exe" file will be found buried away in a special file with a variable name along the lines of "wow64_microsoft-windows-onedrive-setup-31bfxxxxx" where the string of characters at the end of the file name will vary from one machine to the next.
    Simply double click the OneDriveSetup.exe file that search found for you to launch the reinstallation of OneDrive.
    Follow the full installation instruction sequence to reinstall OneDrive, including logging in to your Microsoft account, this will resynchronise your local OneDrive folders and policies with those on the Microsoft remote server.

    Next, after a few moments (with internet access) the OneDrive icon will reappear on the desktop taskbar and synchronisation should complete, this may take a while if you had a lot of data stored in the OneDrive documents folders.

    Next, change the settings in OneDrive as follows:
    Click the OneDrive icon on the desktop taskbar and select "Help and settings" and then click on "Settings".
    On the first tab "Settings" under "Files On-Demand", de-select the option "Save space and download files as you use them".
    On the second tab "Account" under "Choose folders" click the "Choose folders" button and deselect all files and folders, you may need to expand the primary folder groups to de-select the individual folders and files contained within, the "Personal Vault" group will probably keep re-enabling itself after you OK and exit but this is not used by apps so it can be ignored, all the other groups though must be de-selected.

    Next, click on the "Backup" tab and then click on "Manage backup".
    The "Manage folder backup" page contains three icons "Desktop", "Documents" and "Pictures", (you should also see a red warning message "We can't backup documents because you aren't syncing...." this is normal because you deselected the documents (and its contents) folder in the previous step).
    If any of the folder icons show the text option "Stop backup" click that text link and confirm that you want to stop backup.
    Note that in this context, backup does not relate to the more general Windows system backup, rather it refers to syncing between your local device OneDrive Documents, Desktop and Pictures folders and your cloud OneDrive folder(s) on Microsoft's server so that you can access up-to-date contents of those folders from any other device you have that you installed the OneDrive service on.
    As a final check, after Backup is stopped (if applicable) and the icon for the Documents folder is already disabled, at the top right of the icons for Desktop and Pictures there is a tiny blue check mark, click the check mark to de-select those folders, you should not be able to see or select the check mark on the Documents folder icon since this is already de-selected, close the window by clicking the "X" at the top-right of the page, do not click anything else on the Backup tab.
    Click the "Ok" button to apply the new settings generally and then exit the OneDrive settings page.

    Reboot the computer.

    Check the default location of your local user Documents folder:
    Open the File Explorer window and mouse-right-click on the shortcut to "Documents" in the left side pane.
    Click on Properties and then the "Location" tab.
    Confirm that the location of your personal documents folder is shown as:
    C:\Users\<Your User name>\Documents.
    If this is incorrect and is pointing to the OneDrive Documents folder you can click on the "Restore Default" button, or click the "Move" button and redirect the path to the default location as above.

    Now re-run the installers for all your astro apps and test again to see if this has fixed the problem of MaxIm / ACP / FocusMax trying to write and read to the OneDrive Documents folder on both your local machine and remotely syncing with Microsoft's OneDrive server instead of your just your local "Documents" folder on your local hard drive.

    If this is successful with the new policies enabled and synchronised with your Microsoft Account and the OneDrive (remote server) folder you can either leave things as they are or remove OneDrive completely as described in the earlier reply, which should leave the current policy settings as they stand.
    Leaving OneDrive installed but basically disabled has no impact on the system and is probably the best option.

    Finally, if Controlled Folder Access (CFA) was previously enabled and/or you use the machine to browse the internet, install programs from unknown developers or use it for general email purposes and want to protect the machine against ransomware encryption then return to the "Virus & threat protection" settings and re-enable "Controlled Folder Access".
    Once this is enabled then a new link will appear below the CFA soft switch "Allow an app through Controlled Folder Access" click the link and then click the button "+ Add an allowed app" and navigate to the .exe files for each of your astronomy automation apps in turn and add them to the allowed list (Maxim, ACP, ACP Scheduler, FocusMax etc.), plus any other principle applications and their associated helper apps that you might use and that are not verified by Microsoft or purchased via the Microsoft Store.
    When CFA is enabled all applications that are not purchased from or verified by Microsoft are prevented from writing files to any location other than your local documents folder, or the desktop, and applications that seek to write files to any other location are blocked from doing so unless you manually add their .exe file to the CFA approved list.
    Note 1: if you can't find where an applications .exe is located , mouse-right-click the Apps desktop shortcut and click "Open file location" or, from the Start-Programs list, mouse-right-click the program name then click "More" and finally "Open file location" to show the path to the .exe, you can then use that information to navigate to the correct .exe in the CFA "+ Add an allowed app" function.
    Note 2: If you use certain third party Antivirus Software you may find that you have no control over CFA and can not disable or enable it since this function is commandeered by the AV software as part of their protection suite, if this applies to you check the user manual for the AV software for how to control CFA and how to add programs to the permitted apps list.

    On my own observatory Win 10 PRO computer, CFA is disabled and OneDrive is installed but disabled as described above but then it is an Intel Gen 7 CPU without the TPM.2.0 module and the only other Win 10 systems I have are all Virtual Machines running on a Mac and so I am not able to replicate your setup.

    Hopefully the above may resolve the problem, if not then I'm not aware of any other approaches to the problem and maybe Microsoft Tech Support can help but be prepared for a long wait to reach the right level of support...
    Last edited by William Bristow; Oct 29, 2021 at 07:32. Reason: Added text and clean-up editing

  7. #7
    Join Date
    Sep 2016
    Location
    Sussex, UK
    Posts
    160

    Default

    Thanks William for your further detailed comments and suggestions. I will try following the path you suggest and report back in due course.
    Stephen

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with Microsoft OneDrive?
    By Roger Baylon in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 4
    Last Post: May 18, 2021, 15:40
  2. Troubles installing Scheduler on a Win7Ultimate machine
    By Marco Lorenzi in forum Pre-Sales Technical Questions and Help
    Replies: 3
    Last Post: Jul 30, 2020, 21:21

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •