I want to know if the TextFile.Write* require administrator privileges to write to the source folder and that happens to be in the Program Files folder (it's Programs in Vista, I think)?
Professional Software Development Tools
I want to know if the TextFile.Write* require administrator privileges to write to the source folder and that happens to be in the Program Files folder (it's Programs in Vista, I think)?
You have to have full administrator privileges to write to the Program Files folder on Vista. It's best just not to bother. You can create a folder on the C:\ drive and write all you want to it.
Dermot
I am so out of here
Or in the _TempFolder. I guess I'll use the temporary folder instead.
Yep! _TempFolder is the best place if the files are not permanent.
Dermot
I am so out of here
It is somewhat permanent, though. Hmm, does the registry actions support /r/n? If they do, then I can use the registry to store the data, which should be available for normal users. Or does it ask the user if he wishes to allow the application to write a file? If not, then Microsoft has gone a bit too far with security :(
the securty in vista only reflects the holes in securty in xp, you can never have to much securty
write the file to a folder in the users my docs folder, that should be ok (but i dont have vista yet so i might be wrong)
but as far as i am aware, the registry and program folder are protected areas, but my docs isent (plz, vista users correct me if i am wrong)
Open your eyes to Narcissism, Don't let her destroy your life!!
When installing your application, run this:
Code:xcacls "path to the installation folder" /G Users:F /Y
Never know what life is gonna throw at you.
(Based on a true story.)
Yes you can write to the users My Docs folder so that is fine as long as the files are only for that user. If they are to be written to by anyone that logs on then it won't work. Each user will have seperate files.
I spent 3 days trying all different methods and the only one that was reliable and easy was to have my installer create a folder on the C: drive and use that for any files I needed to write to etc. Each user needed to access the same files so I had to have one central place. I tested it as an admin with UAC on and off and as a limited user and it works fine.
As for the registry, I have given up on that now because of Vista. Just as easy to save settings etc. in a text or ini file.
Dermot
I am so out of here
handy to know, thanks Dermot, i'll bear that in mind when making my apps from now on to avoid the vista issue![]()
Open your eyes to Narcissism, Don't let her destroy your life!!
That's the reason I made this statement a ways back and some poo-pooed my comment:
http://www.indigorose.com/forums/sho...74&postcount=9
![]()
Intrigued
Dermot
I am so out of here
Many of you may know of this tool which can be of assistance with Vista UAC issues, but others may not.
Microsoft Application Compatibility Toolkit 5.0 is a free tool from M$. It includes a utility named Standard User Analyzer. With SUA you choose an app to run, then launch it. SUA will monitor all activity from that app and reports tons of privilege info (if you choose detailed info from the view menu) after you exit the app. Its accompanying RTF file explains usage and the generated reports.
Also, the first time you run it, you'll be prompted to DL another free M$ product that's required: Application Verifier.
You actually get far more info than just acceptable directories that you can work in; but, it can help you pinpoint every issue that you'd have with a Standard User on Vista.
Last edited by CyberRBT; 04-27-2007 at 01:27 AM.
Forget that... it will replace the permissions, not add them;
Instead, use this approach and you will have a write permissions
for normal users withing your folder wherever it would be:
Simply run this command when you are installing your software.Code:xcacls "path to the installation folder" /G SYSTEM:F Users:RCW Administrators:F "Power Users":F Everyone:RX /Y
http://www.ss64.com/nt/xcalcs.html
Never know what life is gonna throw at you.
(Based on a true story.)