CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Vista file inconsistency/install woes, and how to fix them

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
epmoyer



Joined: 12 Oct 2007
Posts: 1

View user's profile Send private message

Vista file inconsistency/install woes, and how to fix them
PostPosted: Fri Oct 12, 2007 2:49 pm     Reply with quote

In its current implementation the CCS compiler suite, running on Vista, can (and generally will) exhibit behavior where the .c / .h source files you edit within the IDE do not appear when you browse to C:/Program Files/PICC/Examples (or …/Drivers, or whatever). This happens because under Windows Vista, the OS protects access to the C:/Program Files directory. By default applications (like Ccsc.exe) do not run in administrative mode, even though you may be logging into (or have installed using) an account with administrative privileges. When the app tries to edit a file in C:/Program Files/PICC/Examples (for example), Vista “Protects” the access by creating the new (changed) file in C:\Users\<YOUR_USER_NAME>\AppData\Local\VirtualStore\Program Files\PICC\Examples\...<whatever> instead.

This can result in some rather dreadful consequences such as:

1) You can browse to a file in C:\Program Files\PICC within the IDE’s file explorer and the file you open WILL NOT MATCH the one you see if you browse to the same location using Windows Explorer (presuming you have edited the file in the IDE).
2) You can totally uninstall the compiler, delete the C:\Program Files\PICC directory, reinstall the compiler, and have “ghost” old copies of your files override the new ones whenever the compiler goes looking for them.
3) You can upgrade to a new version of the compiler and files which should have been overwritten by the installer may be superseded at runtime by old copies in the Virtual Store.

The root problem is that under Vista applications simply should not be storing user content under C:\Program Files, and the CCS tools violate that paradigm.

I experimented with several fixes. If you are very diligent and want to do a whole lot of manual clicking you can install the tools to C:\Program Files\PICC as usual and then (before running them) manually open the “Properties” dialog on each .exe, go to the “Compatibility” tab, and check the “Run this program as an administrator” box. If you accidentally miss one you’ll open the door for madness, because files will be created in the Virtual Store even if you start the compiler and close it without doing work.

A better fix (in my opinion) is to
1) Archive your old files if you have any, making sure to note that some of them may be in C:\Users\<YOUR_USER_NAME>\AppData\Local\VirtualStore\Program Files\PICC\...
2) Run uninstall.
3) Delete C:/Program Files/PICC and delete C:\Users\<YOUR_USER_NAME>\AppData\Local\VirtualStore\Program Files\PICC
4) Create a C:\Program Files (Unmanaged)\PICC directory.
5) Reinstall the tools, and when prompted for the install directory use C:\Program Files (Unmanaged)\PICC.

Yes, this method does fly in the face of the “security” Vista is trying so hard to provide (the new C:\Program Files (Unmanaged)\... directory will not be treated specially by Vista, and any application can write to it without having admin privileges), BUT when faced with apps that do not yet adhere to the new Vista paradigm this method provides a way to temporarily avoid some pretty frustrating pitfalls until a newer Vista-friendlier version is released.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group