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 - 29 Mar 2008 12:44 GMT
> Since Windows 2000, all user setting files should be stored separately
> in the user's application settings directory. But some users still
[quoted text clipped - 13 lines]
> they run my application.
> Thanks.
just a thought, how about optionaly putting all the program files in the
user settings dir ?
Colin =^.^=
Peter Bromberg [C# MVP] - 29 Mar 2008 12:51 GMT
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/microsoft.public.windows.vista.security/browse_th
read/thread/7b44901dc7d50ed3/2571bf72d0ad75a6?hl=en&lnk=st&q=mt+manifest+Vista+a
dministrator#2571bf72d0ad75a6
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
> Since Windows 2000, all user setting files should be stored separately
> in the user's application settings directory. But some users still
[quoted text clipped - 13 lines]
> they run my application.
> Thanks.