473,473 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Possible to make files in application dir in Vista?

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.
Mar 29 '08 #1
2 1706
"Sin Jeong-hun" <ty*******@gmail.comwrote in message
news:91**********************************@d21g2000 prf.googlegroups.com...
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 =^.^=
Mar 29 '08 #2
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:
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.
Mar 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
3
by: =?Utf-8?B?Qm9iRg==?= | last post by:
I need to move files between folders. I am using VB.Net 2005. First I check the target folder to see if the files exist, and if so, delete them. Then I move the replacements, one at a time using:...
1
by: CATraveler | last post by:
I’m unable to access my new laptop Vista files on a LAN from my XP desktop. The message is access denied you might not have permissions to use the network resource. Vista file permissions are set to...
1
by: Steve Mavronis | last post by:
I tried to install Python 2.51 on Microsoft Vista Ultimate 32-bit because I use the 3D modeler software Blender 2.44, in case I needed additional Python support in the future for add-on scripts. ...
7
by: Computer Guru | last post by:
Hello All, I'm at my wit's end on this one, and would appreciate any help or insight that could be given. Environment: Windows Vista x64 ONLY Code: //START BUG
3
by: =?Utf-8?B?S2Fyc3RlbiBMdW5kc2dhYXJk?= | last post by:
Hi, I have made an application in C#, where I use the statement Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) to get the name of the "Program Files" folder. It works fine in...
0
by: =?Utf-8?B?VHJhY2tz?= | last post by:
I created a setup program in VS2005 ide. It installs my app on 98-Vista. I have tried this with the Click once check box checked(full trust) and not checked does not seem to matter. Anyway, the...
5
by: =?Utf-8?B?VHJhY2tz?= | last post by:
I include some sample binary data files (produced by my software) with my application installation for the user to do what they want with. I put the files in the Users Personal Data...
4
by: Oriane | last post by:
Hi Steven, "Steven Cheng " <stcheng@online.microsoft.coma écrit dans le message de news:ZJOyi9J4IHA.4928@TK2MSFTNGHUB02.phx.gbl... Thanks for the link. I've tried that but there is one withdrawal...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.