Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Possible to make files in application dir in Vista?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sin Jeong-hun - 29 Mar 2008 11:07 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.