Thanks for answering. The users are logging into Windows Vista locally
from the very same computer and my application autostarts on login. My
application then tries to read data from the file and update the file
by using the following techniques:

TRUserSettingsData userData = new TRUserSettingsData();
fs = new FileStream(fileNameWithPath, FileMode.OpenOrCreate);
userData = (TRUserSettingsData)formatter.Deserialize(fs);
fs.Close();

BinaryFormatter formatter;
FileStream fs = new FileStream(fileName, FileMode.Create);
formatter.Serialize(fs, userData);
fs.Close();

Note that the code above is just cut from the original, there is some
try...catch stuff and other thing around. I just shortened it for
readiness.
The file is on the local harddrive, and is originally created by my
app running from a Windows account with administrative privelegies.


On 26 Nov, 05:47, "Charles A. Lopez" <[EMAIL PROTECTED]> wrote:
> I assume Win Vista uses NTFS like NT, 2000, XP. And yes, privileges do
> matter. How are the different users accessing the file?
>
>
>
>
>
> On Tue, Nov 25, 2008 at 3:19 PM, Marcus <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I have made an application in c#.
> > Regardless of which Windows account the application is launched from,
> > the application must be able to read and write the same file on the
> > local hard drive, even if the Windows account doesn't have
> > administrative privilegies.
> > This is so that the different users can share data.
>
> > I have googled for many hours on how to accomplish this in .Net. But
> > found no easy solution.
> > I am running Vista by the way.
> > I have stumbled across terms like ACL, UAC, FileShare
> > I have also tried implementing code like the one on
> >http://www.sarampalis.org/articles/dotnet/dotnet0002.shtml
>
> > Does this really have to be rocket science??? This should be dead
> > simple, because it must be a really common task for programmers
> > (sharing data between users).
>
> > I really hope someone can help me with this. I am going out of my mind
> > here!
>
> --
> Charles A. Lopez
> [EMAIL PROTECTED]
>
> Bachelor of Arts - Computer Science
> New York University
>
> Registered Microsoft Partner
>
> New York City, NY- Dölj citerad text -
>
> - Visa citerad text -

Reply via email to