Better Vista compability (UAC)

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Ricky28269
Posts: 2
Joined: Fri Apr 06, 2007 5:57 am

Better Vista compability (UAC)

Post by Ricky28269 »

Hi,

(UAC stands for User Account Control, the new feature of Vista that limits the privileges of administrators and then pops up dialogs when full administrative privileges need to be temporarily enabled - perhaps you have seen the Mac ad? Even though the ad is biased and hypocritical, it gives an exaggerated idea of how UAC works...)

I found that TextPad doesn't work with UAC when opening text files that require administrative privileges to edit. Even worse, it can be very, VERY confusing!

In best case, TextPad just pops up an error that says the document is read-only.

But, with some documents, TextPad doesn't detect that it's read-only. Somehow the document doesn't get saved, but TextPad shows that it is saved anyway. Even more odd, if you close and reopen the document with TextPad, THE DOCUMENT IS STILL MODIFIED, but only in TextPad's little world - it is not actually modified at all, and if you open it in another program like Notepad, the document is still in its original state!

I cannot tell you how aggravating it was, when I tried to edit an Apache configuration file in TextPad. Because the file was inside C:\Program Files, it required administrative privileges to edit. Yet, TextPad pretended like it was saved. And still, Apache was giving me errors about the configuration file. It was baffling. Finally, I closed TextPad and opened the file in Notepad, and... none of my changes were saved! I had to modify it with Notepad while running as administrator, and then I saved it and suddenly Apache worked.

I know for a fact that TextPad could simply pop up a UAC dialog when it requires administrator privileges for saving to files like these. Please implement this feature to be compatible with Vista!

Also, I would like to note, there isn't really a workaround for this, because you can't simply go to the Compatibility tab and enable "Run as administrator". If you do this, then when you right-click a document and click TextPad, it shows an error message and doesn't open TextPad - so it essentially breaks the ease of TextPad, and instead you have to go to the start menu, open TextPad, and then File>Open the text file. What a pain! For now, I'm just putting up with this because TextPad is my favorite text editor, but I'm seriously considering switching to another text editor if they support Vista better than TP does.

~Ricky
RBBOT
Posts: 4
Joined: Mon Apr 23, 2007 11:09 pm

Post by RBBOT »

This is vista's "compatibility files" feature. When vista detects a file in a protected folder is opened for writing by a program that is not written to be UAC aware, it creates a compatibiltiy file inside your user profile folder in AppData\Local\VirtualStore and saves the data there instead of in the real protected location.

Then the OS intercepts all future IO opertions to that file for your user account and redirects them to the copy in the virtualstore folder - hence when you reopen the file in textpad it show the edits. However, for applications running under another user account (in your case the apache service), it still lets them read the original unedited file.

I think the rationale for this was for people who don't have admin rights to allow them to install/use older programs that write data files to locations that are now protected by the default security settings by giving each user their own copy of the file.

When this has happened, if you browse to the folder that is supposed to contain the edited file in explorer, you will see a new "compatibilty files" item appear in the toolbar which allows you to copy the edited version back over the original.


The workaround I've used for this is to set my start menu shortcut to textpad to run as administrator then drag and drop files onto textpad to open them, or use the file open dialog rather than using the right click on file method.

It would be nice to have the application UAC aware though.
Post Reply