It seems that something goes wrong when the InstallBuilder installer used by Arduino Create Agent queries Windows for the location of the Windows "Startup" folder. My hypothesis is that this might be caused by some misconfiguration of your Windows installation.
I'm going to ask you to check the configuration of this folder in the Windows registry.
Although the instructions below are safe in that they do not involve making any changes, please be very careful as an unintentional change to the Windows Registry could put your system into a non-functional state.
It is recommended to create a backup before starting:
Right click on the Windows "Start" button.
A context menu will open.
Select "Search" from the menu.
The search field will be selected.
Type registry editor in the search field.
Select the "Registry Editor" app from the search results.
The "Registry Editor" window will open.
Right click on the field below the menu bar in the "Registry Editor" window. ⓘ The field I am referring to will contain some text like Computer.
A context menu will open.
Select "Select All" from the context menu.
All text in the field will be selected.
Select "View" from the toolbar at the top of the File Explorer window.
Check the box next to "☐ Hidden items" if it is not already checked.
Navigate to the path that was shown in "Value data" field of the "Edit String" dialog of the Registry Editor.
Does the folder at that path exist?
Switch back to the "Registry Editor" window.
Click the "Cancel" button in the "Edit String" dialog.
The "Edit String" dialog will close.
Select File > Exit" from the Registry Editor menus.
The "Registry Editor" window will close.
Please reply here on the forum thread to let us know whether you discovered any problems with the configuration of the Windows "Startup" folder while performing the instructions above.
Hopefully this information might allow us to understand the cause of the installer error and identify a potential solution.
It is odd that your registry is different from mine since I checked with a fresh installation of Windows 10. But I think the two are functionally equivalent so this should be OK actually.
I did a bit more research into this subject and found there is another registry key that overrides the Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders key I asked you to check in my previous reply. So I'm going to ask you to check the value of that key. The procedure is identical with the exception of the different key name at step (7), but I'll go ahead and provide the full set of instructions for the sake of clarity:
Right click on the Windows "Start" button.
A context menu will open.
Select "Search" from the menu.
The search field will be selected.
Type registry editor in the search field.
Select the "Registry Editor" app from the search results.
The "Registry Editor" window will open.
Right click on the field below the menu bar in the "Registry Editor" window. ⓘ The field I am referring to will contain some text like Computer.
A context menu will open.
Select "Select All" from the context menu.
All text in the field will be selected.
Select "View" from the toolbar at the top of the File Explorer window.
Check the box next to "☐ Hidden items" if it is not already checked.
Navigate to the path that was shown in "Value data" field of the "Edit String" dialog of the Registry Editor, replacing %USERPROFILE% with C:\Users\<username> (where <username> is your Windows username).
Does the folder at that path exist?
Switch back to the "Registry Editor" window.
Click the "Cancel" button in the "Edit String" dialog.
The "Edit String" dialog will close.
Select File > Exit" from the Registry Editor menus.
The "Registry Editor" window will close.
Please reply here on the forum thread to let us know whether you discovered any problems with the configuration of the Windows "Startup" folder while performing the instructions above.
Hopefully this information might allow us to understand the cause of the installer error and identify a potential solution.
No. The "Startup" folder didn't exist for me. Creating it manually fixed the problem and I was successfully able to install the ArduinoCreateAgent afterwards.
Thanks for your help, but - the ArduinoCreateAgent asks for admin access before opening, why doesn't it create the Startup folder automatically instead of crashing?
You are welcome. I'm glad it is working now. Great job on finding the problem and solving it!
The Arduino Create Agent are tracking the task of fixing this problem (or at least improving the user experience when it happens if that is not possible e.g., the fault is in the 3rd party InstallBuilder installer framework, which Arduino does not maintain) here: