From: Claire on 4 Mar 2010 16:42 Hello, I just encountered that problem in Windows 7 64 bit although Windows 7 32 bit does not have that problem. User (?) installed my application in c:\Program Files(86) folder. My app creates subfolders to App.Path during normal program operation. Despite user being the administrator the subfolder cannot be created (there is an error "File/Path Access Error" How should I proceed in that case? Should the installation insist on another program location (which one) or should I consider something else? Your help appreciated, Claire
From: Karl E. Peterson on 4 Mar 2010 17:00 Claire wrote: > I just encountered that problem in Windows 7 64 bit although > Windows 7 32 bit does not have that problem. > User (?) installed my application in c:\Program Files(86) folder. > My app creates subfolders to App.Path during normal program operation. > Despite user being the administrator the subfolder cannot be created (there > is an error "File/Path Access Error" > > How should I proceed in that case? > Should the installation insist on another program location (which one) or > should I consider something else? Yes, you need to consider something else. And what that may be depends on whether you want to create folders for each individual user, or a common folder all users share, or simply folders for your application to store data within. Things aren't what they used to be! Lemme Tell Ya Where To Stick It -- Visual Studio Magazine http://visualstudiomagazine.com/articles/2009/01/19/lemme-tell-ya-where-to-stick-it.aspx -- ..NET: It's About Trust! http://vfred.mvps.org
From: Claire on 4 Mar 2010 21:27 Why there is a difference between Windows7 32 bit (no problem) and 64 bit where is a problem. Are there different rules for those ? Claire "Karl E. Peterson" <karl(a)exmvps.org> wrote in message news:OI5abY%23uKHA.4492(a)TK2MSFTNGP05.phx.gbl... > Claire wrote: >> I just encountered that problem in Windows 7 64 bit although >> Windows 7 32 bit does not have that problem. >> User (?) installed my application in c:\Program Files(86) folder. >> My app creates subfolders to App.Path during normal program operation. >> Despite user being the administrator the subfolder cannot be created >> (there is an error "File/Path Access Error" >> >> How should I proceed in that case? >> Should the installation insist on another program location (which one) or >> should I consider something else? > > Yes, you need to consider something else. And what that may be depends on > whether you want to create folders for each individual user, or a common > folder all users share, or simply folders for your application to store > data within. Things aren't what they used to be! > > Lemme Tell Ya Where To Stick It -- Visual Studio Magazine > http://visualstudiomagazine.com/articles/2009/01/19/lemme-tell-ya-where-to-stick-it.aspx > > -- > .NET: It's About Trust! > http://vfred.mvps.org > >
From: Nobody on 5 Mar 2010 00:40 "Claire" <replyto(a)fra> wrote in message news:O2QUgtAvKHA.5340(a)TK2MSFTNGP04.phx.gbl... > Why there is a difference between Windows7 32 bit (no problem) and 64 bit > where is a problem. > Are there different rules for those ? It's not just Windows 7, but Windows 2000+ as well. Your application would not work if the user is a member of the limited "Users" group on Windows 2000. This group has read only access to "Program Files" and subfolders. In 2000/XP/2003 Server, things seem to work fine because the default user is Administrator, especially for home users. In Vista+, the default user acts as a member of the limited "Users" group(unelevated Admin), even though that user is a member of the Administrators group. To act as a member of the Administrators group, a user has to right-click and use "Run as Administrator". What you are seeing in 32 bit vs. 64 bit is that you are probably not testing identical behavior. Perhaps you were doing some runs elevated, and some without. Also, the system in Vista+ redirects some things to a different location, usually: C:\Users\<UsedID>\AppData\Local\VirtualStore\Program Files\MyApp\config.ini The solution is to use SHGetSpecialFolderLocation() or similar functions, and store your data elsewhere. If the data are per user, then you could use: sDataPath = Environ("APPDATA") & "\MyApp" On Error Resume Next MkDir sDataPath However, using API functions is preferable. APPDATA is usually (2000/XP2003): C:\Documents and Settings\<USERID>\Application Data In Vista/2008/7: C:\Users\<USERID>\AppData\Roaming The per user locations are always writable. The all users locations or common locations are not usually fully writable by all users by default. If you want to use one of them, then you have to change the permissions at install time. If you are using Inno Setup, then you can use the following in your script: [Dirs] Name: {commonappdata}\MyApp; Permissions: authusers-full If you are using the Package and Deployment Wizard, see this post: http://groups.google.com/group/microsoft.public.vb.general.discussion/msg/bf6cfaefa0cb646c You may want to read that thread because it contain discussion relevant to your situation. Here is a link to the beginning of the thread: http://groups.google.com/group/microsoft.public.vb.general.discussion/browse_thread/thread/26fba80e51340c06/e1b72d77135522fa
|
Pages: 1 Prev: Error 20533 (unable to open Database) in Crystal Reports Next: VB Express |