duncan webster | 28/09/2017 10:58:18 |
5307 forum posts 83 photos | I've been learning how to use the TM1637 displays, and having sorted it out how to display 4 characters in one line of code I've written a word doc as an aide memoire. The obvious place to file this is in Program Files(x86)/Arduino/libaries/TM1637-1.1.0/docs but it won't let me. It keeps asking for admin status. I've tried changing the permissions , but it just reverts back straight away. Any gurus out there who know how to do it? I'm on W7 The chap who helped me sort out the code is a Linux man, won't touch Windows! |
Neil Wyatt | 28/09/2017 15:38:13 |
![]() 19226 forum posts 749 photos 86 articles | Your computer is trying to protect you. Keep your own user libraries separate, otherwise if you have to reinstall you will lose all your own custom libraries. Neil |
SillyOldDuffer | 28/09/2017 16:43:13 |
10668 forum posts 2415 photos | I agree with Neil about the wisdom of keeping user, system and application files separate. But I also agree with Duncan that keeping the documentation with the library is a good idea as is keeping user libraries with the Arduino libraries. (The problem with creating separate user library folders is telling the Arduino IDE where they are.) Keep separate copies of your libraries as well! One way of adding the files is to:
Dave |
duncan webster | 28/09/2017 19:32:19 |
5307 forum posts 83 photos | The library is a standard Arduino, and the folder Program Files(x86)/Arduino/libaries/TM1637-1.1.0/docs already exists, downloaded from Github I think, but wouldn't swear to it. If I go to 'manage accounts' there is just me as administrator, no-one else, so I presume I am the administrator. I tried creating a new folder Program Files(x86)/Arduino/libaries/TM1637-1.1.0/More Docs which it let me do, but then it wouldn't let me paste in the .doc. If I click on security for the More Docs file, and then on Administrators and Edit, all the sensible boxes are ticked, but greyed out I then tried going up a level into Arduino/libraries, I can create a folder but not put anything into it. If I had any hair I'd tear it out! |
SillyOldDuffer | 28/09/2017 20:26:24 |
10668 forum posts 2415 photos | Bear with while I switch to Windows and have a look at the gory details. Nothing whatever to do with the Arduino problem but it's not a good idea to operate Windows as a user with admin privileges. If you catch anything nasty off the web it will have full access to your machine. Safer to use Windows as an ordinary user to stop any intruders getting full privileges and use the admin account just for admin. Dave |
SillyOldDuffer | 28/09/2017 21:40:21 |
10668 forum posts 2415 photos | Hmmm. I've not been able to replicate the fault yet. There are two download types available on the Arduino website. The first is a Windows Installer. It installs the Arduino application and files under ProgramFiles(x86), which is what you have Duncan. I ran the install as an ordinary user; it asks for the admin password and then does it's stuff. Then, I can create folders and copy files to them even though they're under ProgramFiles(x86); again I'm asked for the admin password. The second is a plain zip file. You can unpack this anywhere in your user folder space. The Arduino IDE is activated by navigating to the app file and double clicking it. This install method does not need admin privilege and you have full access to all the folders. (This is how I would install and use it.) I think what's happened is that a permission is mis-set somewhere in your ProgramFiles(x86)/Arduino file strructure. Note that being administator does not automatically ignore permissions; rather it allows you to change them as necessary to allow files to be modified. Trouble is you have to search for the one (or more) permissions that are wrong. The easiest way to fix it might be to Uninstall and re-install the IDE (perhaps using the zip method). I recommend creating an ordinary user account and doing the work from there. Off to try a direct install as admin next; I'll shout if that lets me recreate your problem! Dave
Edited By SillyOldDuffer on 28/09/2017 21:40:44 |
duncan webster | 28/09/2017 22:45:45 |
5307 forum posts 83 photos | I can't remember how I installed the main IDE, but this latest library was downloaded as a zip, extracted and pasted into Program Files(x86)/Arduino/libaries. This is bizarre, if I can paste in a whole directory why can't I paste a file into that directory? Program Files(86) says read only (only applies to files in folder dittoProgram Files(86)/Arduino and the same for Program Files(x86)/Arduino/libaries |
Enough! | 28/09/2017 23:13:46 |
1719 forum posts 1 photos | Posted by duncan webster on 28/09/2017 10:58:18:
The obvious place to file this is in Program Files(x86)/Arduino/libaries/TM1637-1.1.0/docs but it won't let me. It keeps asking for admin status.
Windows post XP considers The Program Files trees protected locations. You can install there but it won't normally allow you or anything/one else to write data there. Data should be written in the appropriate location under c:\users. In fact, if the Arduino IDE is properly written it should placing user-generated data, after the initial install, under c:\users. The protection of this area can (I believe) be bypassed temporarily but frankly you'd be making a rod for your own back. |
duncan webster | 28/09/2017 23:19:56 |
5307 forum posts 83 photos | All my sketches go into C:\Users\Dad\Documents\Arduino should I just open a docs folder in that and put the extra info in there? |
duncan webster | 28/09/2017 23:30:27 |
5307 forum posts 83 photos | Ah, the penny is beginning to drop, and I think this might be what SOD was trying to tell me before. If I open the version of the library that is still sat on my desktop from when I unzipped it I can paste stuff in, so if I delete the one in program files (x86) and copy this modified one in it should work? Time to take the dog out now, so I'll try it tomorrow and let you know. |
Enough! | 29/09/2017 01:03:26 |
1719 forum posts 1 photos | Posted by duncan webster on 28/09/2017 23:19:56:
All my sketches go into C:\Users\Dad\Documents\Arduino should I just open a docs folder in that and put the extra info in there?
[ This whole topic of data in Program Files directories comes up regularly in the Eudora mailing list. Being an old (but very clever) email client, it defaults to putting data files (mailboxes) in the same directory as the program - as was common in the old days. These days, Windows will allow the Eudora installer to write the initial files there but won't allow further writes when you run the program. Fortunately the Eudora installation only defaults to that location if you don't tell it otherwise. It's more than happy if you want them somewhere else (and gives you the opportunity to so specify). Incidentally Eudora was written in Windows 9x days and has been "obsolete" since about 15 years ago when Qualcom stopped developing it and released it into the public domain. It continues to work on all subsequent versions of Windows up to and including Win-10. It still has many users. Including DC1 here iirc. ] |
duncan webster | 29/09/2017 10:37:07 |
5307 forum posts 83 photos | Posted by duncan webster on 28/09/2017 23:30:27:
Ah, the penny is beginning to drop, and I think this might be what SOD was trying to tell me before. If I open the version of the library that is still sat on my desktop from when I unzipped it I can paste stuff in, so if I delete the one in program files (x86) and copy this modified one in it should work? Time to take the dog out now, so I'll try it tomorrow and let you know. Well that worked, thanks chaps. If I'd filed it somewhere else, I'd have forgotten where I'd put it, or perhaps that it even existed. Been there, done that thanks again |
SillyOldDuffer | 29/09/2017 11:21:52 |
10668 forum posts 2415 photos | Ah Duncan, you've been too clever for your own good. You've manually plonked a user program into system space. Bit of explanation: Operating systems take considerable care to protect sensitive parts of the system from the user, and users from other users. For example, a user is never allowed to write to someone else's memory. There are quite a few different 'users' on most systems other than real people, for example there's one to handle printing. One of the true negatives of MS-Windows is that domestic versions allow ordinary users to set themselves up as administrators. One bad effect is that warning messages are suppressed and the user isn't warned he's doing anything unwise. Admin privileges make life very easy until you make a mistake. Then most people discover they don't have the admin training needed to fix admin mistakes. This is why Windows has restore points; with luck it's possible to undo the mistake, though a restore will also throw away all your good changes. When you run a Windows Installer it does more than unpack files and copy them on to the hard drive. It also knows what permissions are required and sets them appropriately. By installing into the shared system folders, it can make the program available to all users on the computer. The installer likely does a lot of other clever stuff too, such as dependency checks, creating icons and setting the Registry etc. It happens that the Arduino IDE can also be 'installed' by a single user copying it into one of his private folders . This 'install' is a simple copy. When done that way, the permissions don't need any special treatment. It just works. The down side is that the installation is private to the user who installed it, not shared. (This probably doesn't matter.) Sounds as if Duncan's installation created a hybrid. The IDE was manually copied into system space without making the necessary changes to the permissions. The IDE works anyway, but there's an unexpected permissions problem when Duncan tries to write a file. Fixing this manually is certainly possible but it might require a lot of detective work. Instead I'd delete the Arduino folder, and re-install the IDE using the Windows Installer Option. That should rebuild the IDE under ProgramFiles with the right permissions. Once that's done the problem should disappear. Fingers crossed and don't forget to sacrifice a virgin first. Dave
Edited By SillyOldDuffer on 29/09/2017 11:22:39 Edited By SillyOldDuffer on 29/09/2017 11:24:38 |
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.