Possible to make files in application dir in Vista?

S

Sin Jeong-hun

Since Windows 2000, all user setting files should be stored separately
in the user's application settings directory. But some users still
want all the files to be created in the application folder, to make
that app "portable".
I've created an application which creates an .mdb database in the
directory where the executable is in (like, C:\Program Files\MyApp\).
But in Windows Vista with UAC is turned on, it can't create any files
when the user runs the application. It seems like only during the
setup (I use the VS.NET setup project) files can be written in that
folder. Is it possible to give "full control" of the folder of my
application (C:\Program Files\MyApp) to "Everyone"? So that my app can
create .mdb files? Can it be done with the VS.NET setup? Or if it's
not possible, how can I elevate the permission during the creation of
the .mdb? (I still prefer giving full control to everyone, since the
users probably think it is annoying to see the UAC dialog every time
they run my application.
Thanks.
 
C

colin

Sin Jeong-hun said:
Since Windows 2000, all user setting files should be stored separately
in the user's application settings directory. But some users still
want all the files to be created in the application folder, to make
that app "portable".
I've created an application which creates an .mdb database in the
directory where the executable is in (like, C:\Program Files\MyApp\).
But in Windows Vista with UAC is turned on, it can't create any files
when the user runs the application. It seems like only during the
setup (I use the VS.NET setup project) files can be written in that
folder. Is it possible to give "full control" of the folder of my
application (C:\Program Files\MyApp) to "Everyone"? So that my app can
create .mdb files? Can it be done with the VS.NET setup? Or if it's
not possible, how can I elevate the permission during the creation of
the .mdb? (I still prefer giving full control to everyone, since the
users probably think it is annoying to see the UAC dialog every time
they run my application.
Thanks.

just a thought, how about optionaly putting all the program files in the
user settings dir ?

Colin =^.^=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top