Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) access denied trying to save/edit Arduino IDE examples (Read 3640 times)
557Torino
Junior Member
**
Offline


Posts: 11
Joined: Aug 30th, 2018
access denied trying to save/edit Arduino IDE examples
Aug 10th, 2019 at 2:35am
Print Post  
Just installed Visual Micro.  When I try to create a new Arduino project, the following error message appears.

Unable to create new sketch

Access to the path 'C:\Program Files (x86)\Arduino\test5' is denied.

Why is this occurring?
« Last Edit: Dec 4th, 2021 at 11:18pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: access denied
Reply #1 - Aug 10th, 2019 at 10:18am
Print Post  
This means that you have set your sketchBook folder to the arduino program files folder. That you do not have permissions for the program files folder because vs is not running as admin. You should NOT set the sketchbook to the program files folder. In the IDE Location window clear the value that you have entered into the "SketchBook Location" then Visual Micro will prompt use the default Arduino location which is "Documents\Arduino"
  
Back to top
WWW  
IP Logged
 
Don Winchell
Junior Member
**
Offline


Posts: 19
Location: Nova Scotia Canada
Joined: Nov 23rd, 2021
Re: access denied
Reply #2 - Dec 1st, 2021 at 6:26pm
Print Post  
I am getting the same access denied message.  I tried putting in my ... documents/arduino directory.  under optional sketch book directory I have also left it blank (which is where it started). 
I have spent about 45 minutes on this but just going around in circles.  I am happy to do a fresh install or whatever it will take to get this working properly.  The problem first arose when I tried to go into the visual micro explorer and use the examples from there.   I get errors that the sketch does not have access to the libraries and now I get a message that I have 5 errors, but no errors are listed.  I am just getting more and more confused and what was a working IDE,  is not really not working at all.  thanks for any help.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: access denied
Reply #3 - Dec 1st, 2021 at 7:02pm
Print Post  
When you open the examples from the Visual Micro Explorer, are you clicking on the *.ino file name (which opens the example from the library), or on the example name (which offers to Open Copy, or Open Original)?

The issue is actually a permissions issue when you attempt to use code from a folder that the current vs user does not have full access too. Running VS in admin mode is an alternative but using the "Open Copy" for examples is a better solution.

If Visual Studio is not run in Admin mode then it is also important to ensure that new Arduino projects are created in a folder that has "write" permissions. Normally we try to create sketches in "Documents\Arduino" for that reason (but the location is entirely up to you)
« Last Edit: Dec 2nd, 2021 at 1:01pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Don Winchell
Junior Member
**
Offline


Posts: 19
Location: Nova Scotia Canada
Joined: Nov 23rd, 2021
Re: access denied
Reply #4 - Dec 2nd, 2021 at 1:03pm
Print Post  
thank you, this helps.   I will try the copy mode.  but as an alternative, what is the best way to consitently open vs / vm in administrator mode?  thanks.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: access denied
Reply #5 - Dec 2nd, 2021 at 1:06pm
Print Post  
The "Advanced" button on the right click "Properties" of the shortcut that you click to run Visual Studio provides a "Run as adminstrator" checkbox.

  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: access denied
Reply #6 - Dec 4th, 2021 at 10:10pm
Print Post  
Good to hear that "Run as adminstrator" solved the access denied problem for you. 

I moved the library discussion here for you:-
https://www.visualmicro.com/forums/YaBB.pl?num=1638571805

Examples tutorial link below. It might explain about examples and how to copy them. "Open Copy" for examples that sit below the arduino ide program files folder is the best option, otherwise it is a read only view of the example.

https://www.visualmicro.com/page/vMicro-Videos.aspx#UseExamplesInVM

You can right click any source file (or project) in the solution explorer and click "Open file location". That opens windows explorer on the location where the file or project is located. You can also select an item int he solution explorer and press F4 or "view>properties window" to see the properties of a solution explorer item in a tool window. One of the properties is the physical location (path)

The "copy example" creates a copy in a sub folder of "sketchbook/my examples".

Visual Studio has the concept of a "Solution". A Solution is simply a way to group projects into a single easy to access work space. You can have one project per solution or multiple projects per solution. Multiple solutions can contain the same project. The solution has no relation to the build process, the Solution simply allow you to organise your work. If you don't save a solution during close (when promped), then you need to use "File>Open>Project" or "File>Open>Arduino Project" to reopen the next time you start the ide.

In many cases, the File menu will also show last opened files and last opened projects. That allows you to find things more easily.


« Last Edit: Dec 4th, 2021 at 10:21pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Don Winchell
Junior Member
**
Offline


Posts: 19
Location: Nova Scotia Canada
Joined: Nov 23rd, 2021
Re: access denied trying to save/edit Arduino IDE examples
Reply #7 - Dec 8th, 2021 at 2:58pm
Print Post  
thanks for your help.  I am moving on with my project as I also try to master visualmicro.  I do think it is worth mastering but I am still haveing issues with these file locations.  yeah, dumb I know but I can work around as needed for now.  the project I am working on is using libraries and they work fine, but when I opened "blink" from the application install directory and some other examples that required a library, VM can't find the library. but I will circle back at some point, right now I am wanting to move my project forward. 

in any case thanks for all your help and at some point I will make "learning visual micro"  my front burner project.

all the best
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: access denied trying to save/edit Arduino IDE examples
Reply #8 - Dec 8th, 2021 at 5:33pm
Print Post  
Ok, if you look at it again let us know and we will help you reset the visual micro settings. Ideally when starting off it is better to use the defaults. The only config setting would be the Arduino IDE location.

When you have time, follow the request in the yellow box above so that we can see what settings you have.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint