Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Security > Program Files Read Only

Reply
Thread Tools Display Modes

Program Files Read Only

 
 
Dweezil38
Guest
Posts: n/a

 
      07-13-2009

Hi Ther

I have a serious problem to fix. I've written a WIndows Applicatio
using visual studio 2008 that uses an Access database to hold data. I'v
placed the database in the same folder as the executible "C:\Progra
Files\MyApp\MyData.mdb". The program installs and work fine under XP an
but when installed and run under Vista, I'm getting file permissio
errors. All user installation and running of the application is done a
the ADMINISTATOR, the only user profile created

My eariler version of the application, written with VS 2005 install
(DOT NET Framework 2.0) and works fine under Vista

I can't change the database location, as eariler versions of this sam
program have been running and working fine under XP. It would mea
changing the data file location for over 200 customers. It would cause
great deal of head aches to modify the application to use a differen
folder for the database

SO here's my questions. What permissions do I need to get read/writ
access to my data file? What steps can be taken to remove the securit
attributes on my data file? Can I change these permissions from withi
my application? The application exe file does have its compatibilitie
property set to "Run as an administrator". Do I have to run th
application under compatibility mode of "Windows XP (Service pack 2)"

--
Dweezil38
 
Reply With Quote
 
 
 
 
DL
Guest
Posts: n/a

 
      07-13-2009
Not an answer, but its not a terribly good idea to hard code any data
location, or anything else, when writting an app, create a routine to locate
the data file, consign that to a variable, then use that variable for the
location

"Dweezil38" <> wrote in message
news:...
>
> Hi There
>
> I have a serious problem to fix. I've written a WIndows Application
> using visual studio 2008 that uses an Access database to hold data. I've
> placed the database in the same folder as the executible "C:\Program
> Files\MyApp\MyData.mdb". The program installs and work fine under XP and
> but when installed and run under Vista, I'm getting file permission
> errors. All user installation and running of the application is done as
> the ADMINISTATOR, the only user profile created.
>
> My eariler version of the application, written with VS 2005 installs
> (DOT NET Framework 2.0) and works fine under Vista.
>
> I can't change the database location, as eariler versions of this same
> program have been running and working fine under XP. It would mean
> changing the data file location for over 200 customers. It would cause a
> great deal of head aches to modify the application to use a different
> folder for the database.
>
> SO here's my questions. What permissions do I need to get read/write
> access to my data file? What steps can be taken to remove the security
> attributes on my data file? Can I change these permissions from within
> my application? The application exe file does have its compatibilities
> property set to "Run as an administrator". Do I have to run the
> application under compatibility mode of "Windows XP (Service pack 2)"?
>
>
> --
> Dweezil38



 
Reply With Quote
 
Bruce Chambers
Guest
Posts: n/a

 
      07-13-2009
Dweezil38 wrote:
> Hi There
>
> I have a serious problem to fix. I've written a WIndows Application
> using visual studio 2008 that uses an Access database to hold data. I've
> placed the database in the same folder as the executible "C:\Program
> Files\MyApp\MyData.mdb". The program installs and work fine under XP and
> but when installed and run under Vista, I'm getting file permission
> errors. All user installation and running of the application is done as
> the ADMINISTATOR, the only user profile created.
>
> My eariler version of the application, written with VS 2005 installs
> (DOT NET Framework 2.0) and works fine under Vista.
>
> I can't change the database location, as eariler versions of this same
> program have been running and working fine under XP. It would mean
> changing the data file location for over 200 customers. It would cause a
> great deal of head aches to modify the application to use a different
> folder for the database.
>
> SO here's my questions. What permissions do I need to get read/write
> access to my data file? What steps can be taken to remove the security
> attributes on my data file? Can I change these permissions from within
> my application? The application exe file does have its compatibilities
> property set to "Run as an administrator". Do I have to run the
> application under compatibility mode of "Windows XP (Service pack 2)"?
>
>



Data should never be saved in the C:\Programs Files area. That's very
poor practice. I'd suggest you fix the application. As it is, you
cannot even honestly claim that the application is WinXP-compatible,
much less Vista-compatible.


--

Bruce Chambers

Help us help you:
http://www.catb.org/~esr/faqs/smart-questions.html

http://support.microsoft.com/default.aspx/kb/555375

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell

The philosopher has never killed any priests, whereas the priest has
killed a great many philosophers.
~ Denis Diderot
 
Reply With Quote
 
Eric Nay
Guest
Posts: n/a

 
      07-14-2009
Dweezil38 wrote:
> ...
> SO here's my questions. What permissions do I need to get read/write
> access to my data file? What steps can be taken to remove the security
> attributes on my data file? Can I change these permissions from within
> my application? The application exe file does have its compatibilities
> property set to "Run as an administrator". Do I have to run the
> application under compatibility mode of "Windows XP (Service pack 2)"?
>


I agree with the others so far. The specific thing you have run into is
that Vista SP1 (I think) blocks R/W access to "C:\Program Files". Fix
your program now before all your customers start using Win7 and complain
to you.

While you're at it, get rid of the need for them to run as
administrator. That's so 1990s...
 
Reply With Quote
 
Dweezil38
Guest
Posts: n/a

 
      07-14-2009

Thanks D

I did that. I figured out a solution. My app just needed a property se
to indicate that it should run as an administrator

Thank

--
Dweezil38
 
Reply With Quote
 
FromTheRafters
Guest
Posts: n/a

 
      07-14-2009
"Dweezil38" <> wrote in message
news:...
>
> Thanks DL
>
> I did that. I figured out a solution. My app just needed a property
> set
> to indicate that it should run as an administrator.


So, now it runs as administrator only because of the need for you to
take the easy way out?

....so what's the name of your software company?


 
Reply With Quote
 
Gordon
Guest
Posts: n/a

 
      07-14-2009


"FromTheRafters" <erratic @nomail.afraid.org> wrote in message
news:#...
>
> ...so what's the name of your software company?
>


So we can avoid its products? ;-)


 
Reply With Quote
 
FromTheRafters
Guest
Posts: n/a

 
      07-14-2009
"Dweezil38" <> wrote in message
news:...
>
> Thanks DL
>
> I did that. I figured out a solution. My app just needed a property
> set
> to indicate that it should run as an administrator.


So, now it runs as administrator only because of the need for you to
take the easy way out?

....so what's the name of your software company?

Be advised that XP was lenient by allowing you to stray from best
practice. Vista begins to enforce stricter adherance, and I've read that
future versions will be even less forgiving. With any luck, you will be
facing thousands of more customers in the future...what then?


 
Reply With Quote
 
Dweezil38
Guest
Posts: n/a

 
      07-14-2009

Ok folks, message received and understood. I quess I'll have to revam
my app and place the Data file in the user profile folder.

In the mean time is there a solution for not running the app as th
administrator

--
Dweezil38
 
Reply With Quote
 
FromTheRafters
Guest
Posts: n/a

 
      07-14-2009
"Eric Nay" <> wrote in message
news:...
> Dweezil38 wrote:
>> ...
>> SO here's my questions. What permissions do I need to get read/write
>> access to my data file? What steps can be taken to remove the
>> security
>> attributes on my data file? Can I change these permissions from
>> within
>> my application? The application exe file does have its
>> compatibilities
>> property set to "Run as an administrator". Do I have to run the
>> application under compatibility mode of "Windows XP (Service pack
>> 2)"?
>>

>
> I agree with the others so far. The specific thing you have run into
> is that Vista SP1 (I think) blocks R/W access to "C:\Program Files".
> Fix your program now before all your customers start using Win7 and
> complain to you.
>
> While you're at it, get rid of the need for them to run as
> administrator. That's so 1990s...


....and default Vista doesn 't easily allow it.

What seems to be "the only user profile created" is actually not the
Administrator account but the "Protected Administrator".


 
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

BB 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
Files attributes Read Only in Program files Munteanu Gabriel Windows Vista File Management 4 04-24-2008 05:36 PM
Changing program to read PDF files in Windows Mail douglas kerr Windows Vista Mail 1 04-27-2007 09:40 PM
How to open a file for read/write access in Program Files directory Michael Harvey Windows Vista Security 1 02-28-2007 10:10 PM
Program to Read Bin/Cue Files? Alan Morris Windows Vista Installation 1 10-17-2006 02:48 AM
Attn: Jonathan Kay Re: c:\program files\%blcdir% Folder in Program Files Adam Windows MSN Messenger 0 09-06-2003 03:11 PM



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