Connecting Tech Pros Worldwide Help | Site Map

Possible to make files in application dir in Vista?

Sin Jeong-hun
Guest
 
Posts: n/a
#1: Mar 29 '08
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.
colin
Guest
 
Posts: n/a
#2: Mar 29 '08

re: Possible to make files in application dir in Vista?


"Sin Jeong-hun" <typingcat@gmail.comwrote in message
news:9189d309-e4c8-499b-bb14-27ea8d875142@d21g2000prf.googlegroups.com...
Quote:
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 =^.^=


=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
 
Posts: n/a
#3: Mar 29 '08

re: Possible to make files in application dir in Vista?


See this post by Willy De Noyette on how to instrument your app with a
manifest that makes it run "as Administrator":

http://groups.google.com/group/micro...71bf72d0ad75a6
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net


"Sin Jeong-hun" wrote:
Quote:
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.
>
Closed Thread