Windows is weird

I’ve just been putting together a post about some modifications to Scratch for use in a school environment that I have used for the Code Club that I run. Everything went well on the school computers, but when I tried to do the same on my own Windows 7 desktop to get some screenshots things went a little weird.

First off, it is a pain to edit the required .ini file. Right click and edit doesn’t give you administrator privileges so you can save it. My first thought was to run Explorer as administrator, but sadly the administrator privileges don’t extend to Notepad when you right click and choose edit. As it happened I was only going to use Notepad for the screenshots, so I took them and then used Notepad++ to do the actual edit. A quick right click and “Edit with Notepad++” followed by closing it and opening it again with administrator privileges did the trick.

This is where things went from slightly annoying (isn’t Windows always!) to weird. When I ran Scratch my edits to the .ini file didn’t appear to have taken, so I checked the file – fine, nothing wrong there. So this being Windows I decided to try a logout and login just to be sure there wasn’t anything odd going on there. No joy. So I decided to check from the command line with Edit. For some reason when I opened the .ini file up in Edit the extra two lines I had added were missing, so I checked in both Notepad and Notepad++ and they were there. I double checked I was working on the same file and there had been no name change for some strange reason and all was well – or at least I confirmed I was working on the same file.

At this point I realised that the command line I was using wasn’t running as administrator, so I opened up an administrator command prompt and headed to the same directory to edit the file there. The only issue was that when I open it in Edit the two lines I had added were there. This would seem to imply that there are two versions of the file, one for the administrator with the edits and one for my user account without. Although then again, not, since when I edited in the GUI with Notepad or Notepad++ either as administrator or my standard user I did have the edits! This didn’t make much sense. For a moment it looked as though I was going to have to mess around with changing the permissions to work out what was going on. Anyway, I switched to the non-administrative command prompt to edit the file, only to find that my changes have magically appeared (and I hadn’t messed with the permissions yet)! So I tried Scratch again and there we go, the changes are working.

So it would appear that, for some reason, the edits I made to the file (using administrative privileges) took a few minutes and a logout and back in again to be visible to my user account! …and some people wonder why I prefer using Linux!!

Leave a Reply

Your email address will not be published. Required fields are marked *