Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

File Locations to Avoid Virtualization

microsoft.public.windows.vista.file management






Speedup My PC
Reply
  #1 (permalink)  
Old 02-28-2007
Wayne Hartell
 

Posts: n/a
File Locations to Avoid Virtualization
This has probably been asked before but I'm running out of time to get an
answer and my initial search turned up empty.

We have an application that runs as a stand alone application and also a
hosted "module" of 3rd party applications. We have found just recently that
one of our 3rd party host applications is certified on Vista and seeing our
Stand Alone application works on Vista (after getting past a couple of curly
issues; at least one MS bug in there) we want to also support our
application running as a module in the 3rd party app.

Problem that we are experiencing is that the 3rd party has done whatever
they need to do in terms of the manifest or what have you to indicate that
their application is Vista aware. This of course turns of file system
virtualization and we are running into a couple of issues when running under
that environment. The main issue is that I am finding our application cannot
access certain files that it should be able to access. We are basically
getting errors saying we cannot access the data in our company folder under
(C:\ProgramData\All Users\<Company Name>\<Application Name>\). But hold on I
thought, isn't this location the "correct" location for application data
that is shared between users? Then I thought that maybe our code is getting
to this location through virtualization and seeing it is turned off now we
hit the problem. So I tracked down the code and it seems we are doing the
right thing, or what I at least expected to be the right thing... we are
using....

Environment.GetFolderPath(Environment.SpecialFolde r.ApplicationData)
Environment.GetFolderPath(Environment.SpecialFolde r.LocalApplicationData)
Environment.GetFolderPath(Environment.SpecialFolde r.CommonApplicationData)
Environment.GetFolderPath(Environment.SpecialFolde r.Personal)

to build up all of our working directories.

So why is this giving us grief on Vista? Isn't this the recommended
practice? Seems like the first one on the list is giving us grief and I am
reading that this is supposed to be for roaming profiles. Maybe that is the
issue?

Please help, or let me know if any additional information is required....


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-28-2007
Wayne Hartell
 

Posts: n/a
Re: File Locations to Avoid Virtualization (Extra Details)
Pretty active group this... I'm talking to myself.

I think I'm resigned to the fact that if we want a folder under
C:\ProgramData\ under Vista we had better be creating those folders and
setting the security at deployment time when we have admin rights (if that's
even possible).

The joys of Vista....


"Wayne Hartell" <w.hartell@ozemail.com.au> wrote in message
news:OGxIDWPQHHA.2340@TK2MSFTNGP05.phx.gbl...
> Yet more investigation and I am pretty sure that this folder is the
> problem...
>
> Environment.SpecialFolder.CommonApplicationData
>
> Under XP this is:
> C:\Documents and Settings\All Users\Application Data
>
> Under Vista this is:
> C:\ProgramData\
>
> The problem is under Vista this folder is not writeable unless running as
> as admin!!! What the? WHERE do we store application data that is shared
> between users then????????????????? SpecialFolder.ApplicationData,
> LocalApplicationData are both user specific!
>
> I have to missing something right????
>
>
> "Wayne Hartell" <w.hartell@ozemail.com.au> wrote in message
> news:u8DZaxOQHHA.3960@TK2MSFTNGP05.phx.gbl...
>> Actually I have Vista open now and the location the starting files are
>> deployed to is:
>>
>> C:\ProgramData\<Company Name>\<Application Name>\<SubFolder>\<SubFolder>\
>>
>> not...
>>
>> C:\ProgramData\All Users\<Company Name>\<Application Name>\
>>
>> which I think is correct, and here is the exception...
>>
>> System.UnauthorizedAccessException: Access to the path
>> 'C:\ProgramData\<Company Name>\<Product
>> Name>\8\Libraries\LiquidLibrary.xml' is denied.
>>
>> So the file is in the correct location (as far as I am aware) and we are
>> trying to access it at the correct location, yet we are denied? Why?
>>
>>
>> "Wayne Hartell" <w.hartell@ozemail.com.au> wrote in message
>>> This has probably been asked before but I'm running out of time to get
>>> an answer and my initial search turned up empty.
>>>
>>> We have an application that runs as a stand alone application and also a
>>> hosted "module" of 3rd party applications. We have found just recently
>>> that one of our 3rd party host applications is certified on Vista and
>>> seeing our Stand Alone application works on Vista (after getting past a
>>> couple of curly issues; at least one MS bug in there) we want to also
>>> support our application running as a module in the 3rd party app.
>>>
>>> Problem that we are experiencing is that the 3rd party has done whatever
>>> they need to do in terms of the manifest or what have you to indicate
>>> that their application is Vista aware. This of course turns of file
>>> system virtualization and we are running into a couple of issues when
>>> running under that environment. The main issue is that I am finding our
>>> application cannot access certain files that it should be able to
>>> access. We are basically getting errors saying we cannot access the data
>>> in our company folder under (C:\ProgramData\All Users\<Company
>>> Name>\<Application Name>\). But hold on I thought, isn't this location
>>> the "correct" location for application data that is shared between
>>> users? Then I thought that maybe our code is getting to this location
>>> through virtualization and seeing it is turned off now we hit the
>>> problem. So I tracked down the code and it seems we are doing the right
>>> thing, or what I at least expected to be the right thing... we are
>>> using....
>>>
>>> Environment.GetFolderPath(Environment.SpecialFolde r.ApplicationData)
>>> Environment.GetFolderPath(Environment.SpecialFolde r.LocalApplicationData)
>>> Environment.GetFolderPath(Environment.SpecialFolde r.CommonApplicationData)
>>> Environment.GetFolderPath(Environment.SpecialFolde r.Personal)
>>>
>>> to build up all of our working directories.
>>>
>>> So why is this giving us grief on Vista? Isn't this the recommended
>>> practice? Seems like the first one on the list is giving us grief and I
>>> am reading that this is supposed to be for roaming profiles. Maybe that
>>> is the issue?
>>>
>>> Please help, or let me know if any additional information is
>>> required....
>>>

>>
>>

>
>



Reply With Quote
  #3 (permalink)  
Old 02-28-2007
Wayne Hartell
 

Posts: n/a
Re: File Locations to Avoid Virtualization (Extra Details)
Hi Jimmy,

Thanks for the explanation.

Do you know if there is any way to obtain the C:\Users\Public\ folder
location through the SpecialFolder APIs or is this just something specific
to Vista that doesn't have an associated API?

Either way I think the best solution for my company's application is to
simply store the data in a user specific location (for some reason we store
information in three different places (local, roaming, shared) - I'm not the
one who designed it that way!) as I don't think there is any real need to
make the data available machine wide other than it would have been "nice" to
share between users on the same machine.

Regards,
Wayne.


"Jimmy Brush" <JimmyBrush@discussions.microsoft.com> wrote in message
news:88E25EE5-6FCF-46DA-A697-B33E2885D9DA@microsoft.com...
> Hello,
>
> Vista is set up such that files saved from one user's account cannot be
> modified from another user's account. This enforces isolation between one
> user account and another, as well as protects settings/files that affect
> the state of the entire system.
>
> Your program should indeed install whatever machine-wide state it needs in
> ProgramData at install time - this folder is shared between all user
> accounts; however, it is a read-only type of shared . Administrator
> privileges are needed to modify these files if the current user did not
> create them because they affect the entire computer, not just the current
> user account.
>
> In accordance with this policy, the security on the ProgramData folder is
> as follows:
>
> System: Full Control over files & folders
> Administrators: Full Control over files & folders
> Creator/Owner: Full Control over files & folders
> Users: Read Only for files, but can create new folders and files
>
> What this accomplishes is that it allows any user to read and create a
> folder/file anywhere inside the ProgramData folder, but the user can only
> modify the files that were created from their user account; they cannot
> modify files created from another user account.
>
> The only exception that I know of to this policy is the c:\users\public
> folder, which is designed to allow users to store documents and such that
> they want to be world read/writable.
>
>
> --
> - JB
> Microsoft MVP - Windows Shell/User
>
> Windows Vista Support Faq
> http://www.jimmah.com/vista/



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeated file & file moving =?Utf-8?B?Sm9obiBU?= microsoft.public.windows.vista.file management 13 02-28-2007 14:15




All times are GMT +1. The time now is 05:49.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120